Update a campaign
curl --request PUT \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_concurrency": 10,
"calling_window": {
"start": "10:00",
"end": "17:00",
"timezone": "Europe/London"
}
}
'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id}"
payload = {
"max_concurrency": 10,
"calling_window": {
"start": "10:00",
"end": "17:00",
"timezone": "Europe/London"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
max_concurrency: 10,
calling_window: {start: '10:00', end: '17:00', timezone: 'Europe/London'}
})
};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id}', 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": null,
"callback": false,
"retries": 2,
"retry_delay_seconds": 3600,
"max_concurrency": 10,
"calling_window": {
"start": "10:00",
"end": "17:00",
"timezone": "Europe/London"
},
"status": "draft",
"started_at": null,
"canceled_at": null,
"ended_at": null,
"created_at": "2026-02-27T15:12:40.000Z",
"updated_at": "2026-02-28T10:01:12.000Z"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Cannot edit a running campaign"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"path": "<string>",
"reason": "model",
"tier": "<string>",
"provider": "<string>",
"model": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": [
"<unknown>"
]
}Campaigns
Update a campaign
Changes a campaign’s settings. Send only the fields to change; at least one is required. Only draft and scheduled campaigns can be edited: cancel a running campaign to stop it.
Setting start_time schedules the campaign; setting it to null returns it to draft. Changing callback also applies the new value to every contact already on the campaign.
PUT
/
v1
/
projects
/
{projectId}
/
campaigns
/
{id}
Update a campaign
curl --request PUT \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_concurrency": 10,
"calling_window": {
"start": "10:00",
"end": "17:00",
"timezone": "Europe/London"
}
}
'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id}"
payload = {
"max_concurrency": 10,
"calling_window": {
"start": "10:00",
"end": "17:00",
"timezone": "Europe/London"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
max_concurrency: 10,
calling_window: {start: '10:00', end: '17:00', timezone: 'Europe/London'}
})
};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id}', 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": null,
"callback": false,
"retries": 2,
"retry_delay_seconds": 3600,
"max_concurrency": 10,
"calling_window": {
"start": "10:00",
"end": "17:00",
"timezone": "Europe/London"
},
"status": "draft",
"started_at": null,
"canceled_at": null,
"ended_at": null,
"created_at": "2026-02-27T15:12:40.000Z",
"updated_at": "2026-02-28T10:01:12.000Z"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Cannot edit a running campaign"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"path": "<string>",
"reason": "model",
"tier": "<string>",
"provider": "<string>",
"model": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"details": [
"<unknown>"
]
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.
Body
application/json
Send only the fields to change.