Connect a domain
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/domains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hostname: '<string>'})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/domains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.1-news.app/v1/projects/{projectId}/domains"
payload = { "hostname": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Domains
Connect a domain
POST /v1/projects//domains connects a domain you own. Send the hostname you want readers to use.
POST
/
v1
/
projects
/
{projectId}
/
domains
Connect a domain
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/domains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({hostname: '<string>'})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/domains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.1-news.app/v1/projects/{projectId}/domains"
payload = { "hostname": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)