Cancel a campaign
curl --request POST \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaign": {
"id": "3f1c2a8e-6b0d-4f6e-9a51-0d2b7c9e4a10",
"project_id": "8d2e4b1a-1c3f-4e5a-9b7d-6f0a2c4e8b13",
"name": "March renewals",
"agent_id": "5b7e9c1d-2a4f-4c6e-8d0b-1f3a5c7e9b24",
"from_number": "+14155550100",
"start_time": "2026-03-02T14:00:00.000Z",
"callback": false,
"retries": 2,
"retry_delay_seconds": 3600,
"max_concurrency": 5,
"calling_window": null,
"status": "canceled",
"started_at": "2026-03-02T14:00:04.000Z",
"canceled_at": "2026-03-02T15:30:00.000Z",
"ended_at": null,
"created_at": "2026-02-27T15:12:40.000Z",
"updated_at": "2026-03-02T15:30:00.000Z"
}
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Campaign is already ended"
}Campaigns
Cancel a campaign
Stops a campaign that has not finished. Calls already in progress finish normally; no new calls are placed. A canceled campaign can be resumed with the start operation. No request body.
POST
/
v1
/
projects
/
{projectId}
/
campaigns
/
{id}
/
cancel
Cancel a campaign
curl --request POST \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaign": {
"id": "3f1c2a8e-6b0d-4f6e-9a51-0d2b7c9e4a10",
"project_id": "8d2e4b1a-1c3f-4e5a-9b7d-6f0a2c4e8b13",
"name": "March renewals",
"agent_id": "5b7e9c1d-2a4f-4c6e-8d0b-1f3a5c7e9b24",
"from_number": "+14155550100",
"start_time": "2026-03-02T14:00:00.000Z",
"callback": false,
"retries": 2,
"retry_delay_seconds": 3600,
"max_concurrency": 5,
"calling_window": null,
"status": "canceled",
"started_at": "2026-03-02T14:00:04.000Z",
"canceled_at": "2026-03-02T15:30:00.000Z",
"ended_at": null,
"created_at": "2026-02-27T15:12:40.000Z",
"updated_at": "2026-03-02T15:30:00.000Z"
}
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Campaign is already ended"
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.
Response
The canceled campaign
An outbound calling campaign.
Show child attributes
Show child attributes