Cancel a plan
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/billing/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"cancel": true
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cancel: true})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/billing/cancel', 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}/billing/cancel"
payload = { "cancel": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"cancelAtPeriodEnd": true,
"currentPeriodEnd": "<string>"
}Billing
Cancel a plan
Cancel a newsroom plan at the end of the current period, or keep it.
POST
/
v1
/
projects
/
{projectId}
/
billing
/
cancel
Cancel a plan
curl --request POST \
--url https://api.1-news.app/v1/projects/{projectId}/billing/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"cancel": true
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cancel: true})
};
fetch('https://api.1-news.app/v1/projects/{projectId}/billing/cancel', 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}/billing/cancel"
payload = { "cancel": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"cancelAtPeriodEnd": true,
"currentPeriodEnd": "<string>"
}Schedule cancellation, or undo a scheduled cancellation. Only the owner can do this. Omit cancel, or set it to true, to cancel at the end of the period.