Redirect the free domain
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/domains/free/redirect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"redirect": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({redirect: true})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/domains/free/redirect', 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/free/redirect"
payload = { "redirect": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"free": {},
"message": "<string>"
}Domains
Redirect the free domain
Send traffic from the free domain to the published custom domain, or stop that redirect.
POST
/
v1
/
projects
/
{projectId}
/
domains
/
free
/
redirect
Redirect the free domain
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/domains/free/redirect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"redirect": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({redirect: true})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/domains/free/redirect', 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/free/redirect"
payload = { "redirect": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"free": {},
"message": "<string>"
}Point the free domain at the custom domain. The custom domain must already be published. You need the domains tool.