Save an ad account
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/ads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"publisherId": "<string>",
"adsTxt": "<string>",
"dnsConfirmed": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
provider: '<string>',
publisherId: '<string>',
adsTxt: '<string>',
dnsConfirmed: true
})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/ads', 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}/ads"
payload = {
"provider": "<string>",
"publisherId": "<string>",
"adsTxt": "<string>",
"dnsConfirmed": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true
}Ads
Save an ad account
Save an advertising account for a newsroom that already has a custom domain.
POST
/
v1
/
projects
/
{projectId}
/
ads
Save an ad account
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/ads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"publisherId": "<string>",
"adsTxt": "<string>",
"dnsConfirmed": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
provider: '<string>',
publisherId: '<string>',
adsTxt: '<string>',
dnsConfirmed: true
})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/ads', 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}/ads"
payload = {
"provider": "<string>",
"publisherId": "<string>",
"adsTxt": "<string>",
"dnsConfirmed": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true
}Save one advertising account. The newsroom needs a connected custom domain. You need the ads tool.