Get a campaign
curl --request GET \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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": "2026-03-02T14:00:00.000Z",
"callback": false,
"retries": 2,
"retry_delay_seconds": 3600,
"max_concurrency": 5,
"calling_window": null,
"status": "running",
"started_at": "2026-03-02T14:00:04.000Z",
"canceled_at": null,
"ended_at": null,
"created_at": "2026-02-27T15:12:40.000Z",
"updated_at": "2026-03-02T14:00:04.000Z"
},
"items": [
{
"id": "9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c2d",
"campaign_id": "3f1c2a8e-6b0d-4f6e-9a51-0d2b7c9e4a10",
"name": "Jane Doe",
"phone_number": "+14155550123",
"channel": "voice",
"country": "US",
"agent_id": null,
"callback": false,
"custom_vars": {
"plan": "Premium"
},
"status": "ended",
"failed_reason": null,
"attempt_count": 1,
"conversation_id": "c7d8e9f0-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
"start_time": "2026-03-02T14:00:05.000Z",
"next_attempt_at": null,
"callback_requested": false,
"callback_origin_item_id": null,
"callback_target_item_id": null,
"created_at": "2026-02-27T15:12:40.000Z",
"updated_at": "2026-03-02T14:03:51.000Z",
"duration_sec": 214,
"resolution": "resolved"
}
]
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Campaign not found"
}Campaigns
Get a campaign
Returns one campaign and all of its contacts, including each contact’s call status, attempt count, the conversation its call produced, the total call duration and whether the call was judged resolved.
GET
/
v1
/
projects
/
{projectId}
/
campaigns
/
{id}
Get a campaign
curl --request GET \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/campaigns/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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": "2026-03-02T14:00:00.000Z",
"callback": false,
"retries": 2,
"retry_delay_seconds": 3600,
"max_concurrency": 5,
"calling_window": null,
"status": "running",
"started_at": "2026-03-02T14:00:04.000Z",
"canceled_at": null,
"ended_at": null,
"created_at": "2026-02-27T15:12:40.000Z",
"updated_at": "2026-03-02T14:00:04.000Z"
},
"items": [
{
"id": "9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c2d",
"campaign_id": "3f1c2a8e-6b0d-4f6e-9a51-0d2b7c9e4a10",
"name": "Jane Doe",
"phone_number": "+14155550123",
"channel": "voice",
"country": "US",
"agent_id": null,
"callback": false,
"custom_vars": {
"plan": "Premium"
},
"status": "ended",
"failed_reason": null,
"attempt_count": 1,
"conversation_id": "c7d8e9f0-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
"start_time": "2026-03-02T14:00:05.000Z",
"next_attempt_at": null,
"callback_requested": false,
"callback_origin_item_id": null,
"callback_target_item_id": null,
"created_at": "2026-02-27T15:12:40.000Z",
"updated_at": "2026-03-02T14:03:51.000Z",
"duration_sec": 214,
"resolution": "resolved"
}
]
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Campaign not found"
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.