Campaigns API
Outbound campaigns, contacts, and dialing.
- GET
/campaignsList campaigns - POST
/campaignsCreate a campaign - GET
/campaigns/{id}Get a campaign - PATCH
/campaigns/{id}Update a campaign - DELETE
/campaigns/{id}Delete a campaign - POST
/campaigns/{id}/startStart a campaign - POST
/campaigns/{id}/pausePause a campaign - POST
/campaigns/{id}/stopStop a campaign - GET
/campaigns/{id}/statsCampaign statistics - POST
/campaigns/{id}/dialAdd contacts and start dialing (one action) - GET
/campaigns/{id}/contactsList contacts - POST
/campaigns/{id}/contactsAdd contacts (single or batch) - GET
/campaigns/{id}/contacts/{contactId}Get a contact - DELETE
/campaigns/{id}/contacts/{contactId}Remove a contact
GET /campaigns
List campaigns
Auth: API key (Authorization: Bearer). Scope: campaigns:read.
Requires one of the following scopes: campaigns:read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Max items to return (1-100). Default |
offset | query | integer | Number of items to skip. Default |
status | query | string | |
agent_id | query | integer | |
search | query | string |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | array of object required | |
data[].id | integer | |
data[].name | string | |
data[].description | string | null | |
data[].status | string | |
data[].agent_id | integer | |
data[].agent | object | null | Accepts any keys |
data[].schedule | object | Accepts any keys |
data[].dialing | object | Accepts any keys |
data[].contacts | object | Accepts any keys |
data[].calls | object | Accepts any keys |
data[].metadata | any | |
data[].tags | any | |
data[].started_at | string (date-time) | null | |
data[].completed_at | string (date-time) | null | |
data[].created_at | string (date-time) | |
data[].updated_at | string (date-time) | null | |
meta | object | Offset pagination metadata (in the top-level meta object). |
meta.total | integer | |
meta.limit | integer | |
meta.offset | integer | |
meta.has_more | boolean |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
POST /campaigns
Create a campaign
Auth: API key (Authorization: Bearer). Scope: campaigns:write.
Creates a campaign in status ready.
The request fails with 400 bad_request when: tcpa_acknowledged is not true; agent_id is not a voice agent of your organization; caller_id is set but is not an active phone number owned by your organization; a non-empty consent_basis is sent (a consent basis cannot be set through the API; an owner or admin declares it in Settings -> Compliance and campaigns inherit it); time_zone is invalid; a daily time is malformed; or daily_start_time is not before daily_end_time.
Out-of-range dialing and retry settings are not rejected. They are silently clamped to the ranges given on each field.
Requires one of the following scopes: campaigns:write.
Request body application/json required
| Field | Type | Description |
|---|---|---|
name | string required | |
agent_id | integer required | |
description | string | |
calling_days | integer | Day-of-week bitmask (Sun=1, Mon=2 ... Sat=64) that NARROWS the organization's outbound calling window — it can exclude days the org window allows but never add days it forbids. 0 = no campaign-level restriction (the org window governs). An integer outside 0-127 is not rejected; it is silently clamped into that range. A non-integer value is rejected with 400. Default |
daily_start_time | string | null | Earliest dial time of day (HH:MM or HH:MM:SS), evaluated on the same clock as the org window (called-party local time when resolvable, else org timezone). Narrows the org window only — cannot start earlier than the org allows. null = no campaign-level restriction. |
daily_end_time | string | null | Latest dial time of day (HH:MM or HH:MM:SS); must be later than daily_start_time. Narrows the org window only. null = no campaign-level restriction. |
time_zone | string | Stored for reference only — NOT used to evaluate the calling window. The campaign daily window runs on the same clock as the org window: the called party's local time when resolvable, else the organization timezone. Must be a valid timezone identifier (IANA ids and PHP-accepted aliases). Default |
tcpa_acknowledged | boolean required | Required. Must be Always |
caller_id | string | Outbound caller ID. When set it must be an active phone number owned by your organization, otherwise the request fails with 400. |
max_concurrent_calls | integer | Out-of-range values are not rejected; they are silently clamped to 1-50. Default |
calls_per_minute | integer | Out-of-range values are not rejected; they are silently clamped to 1-60. Default |
retry_attempts | integer | Out-of-range values are not rejected; they are silently clamped to 0-5. Default |
retry_delay_minutes | integer | Out-of-range values are not rejected; they are silently clamped to 5-1440. Default |
max_daily_calls | integer | Values below 1 are silently raised to 1. |
max_total_calls | integer | Values below 1 are silently raised to 1. |
Responses
201 Campaign created
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.id | integer | |
data.name | string | |
data.description | string | null | |
data.status | string | |
data.agent_id | integer | |
data.agent | object | null | Accepts any keys |
data.schedule | object | Accepts any keys |
data.dialing | object | Accepts any keys |
data.contacts | object | Accepts any keys |
data.calls | object | Accepts any keys |
data.metadata | any | |
data.tags | any | |
data.started_at | string (date-time) | null | |
data.completed_at | string (date-time) | null | |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | null |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
GET /campaigns/{id}
Get a campaign
Auth: API key (Authorization: Bearer). Scope: campaigns:read.
Requires one of the following scopes: campaigns:read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Campaign id |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.id | integer | |
data.name | string | |
data.description | string | null | |
data.status | string | |
data.agent_id | integer | |
data.agent | object | null | Accepts any keys |
data.schedule | object | Accepts any keys |
data.dialing | object | Accepts any keys |
data.contacts | object | Accepts any keys |
data.calls | object | Accepts any keys |
data.metadata | any | |
data.tags | any | |
data.started_at | string (date-time) | null | |
data.completed_at | string (date-time) | null | |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | null |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
PATCH /campaigns/{id}
Update a campaign
Auth: API key (Authorization: Bearer). Scope: campaigns:write.
A running campaign cannot be edited. The request fails with 400 bad_request until the campaign is paused.
It also fails with 400 when agent_id is not a voice agent of your organization, or when caller_id is set but is not an active phone number owned by your organization.
Out-of-range dialing and retry settings are not rejected. They are silently clamped to the ranges given on each field.
Requires one of the following scopes: campaigns:write.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Campaign id |
Request body application/json required
| Field | Type | Description |
|---|---|---|
name | string | |
description | string | |
agent_id | integer | |
calling_days | integer | null | Day-of-week bitmask (Sun=1 ... Sat=64) narrowing the organization's outbound calling window. 0 or explicit null = remove the campaign-level day restriction. An integer outside 0-127 is not rejected; it is silently clamped into that range. A non-integer value is rejected with 400. |
daily_start_time | string | null | Earliest dial time of day (HH:MM or HH:MM:SS), narrowing the org window. Explicit null clears the restriction. |
daily_end_time | string | null | Latest dial time of day (HH:MM or HH:MM:SS); must be later than daily_start_time. Explicit null clears the restriction. |
time_zone | string | Stored for reference only — NOT used to evaluate the calling window (see CampaignCreate.time_zone). Must be a valid timezone identifier. |
caller_id | string | Outbound caller ID. When set it must be an active phone number owned by your organization, otherwise the request fails with 400. |
max_concurrent_calls | integer | Out-of-range values are not rejected; they are silently clamped to 1-50. |
calls_per_minute | integer | Out-of-range values are not rejected; they are silently clamped to 1-60. |
retry_attempts | integer | Out-of-range values are not rejected; they are silently clamped to 0-5. |
retry_delay_minutes | integer | Out-of-range values are not rejected; they are silently clamped to 5-1440. |
max_daily_calls | integer | Values below 1 are silently raised to 1. |
max_total_calls | integer | Values below 1 are silently raised to 1. |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.id | integer | |
data.name | string | |
data.description | string | null | |
data.status | string | |
data.agent_id | integer | |
data.agent | object | null | Accepts any keys |
data.schedule | object | Accepts any keys |
data.dialing | object | Accepts any keys |
data.contacts | object | Accepts any keys |
data.calls | object | Accepts any keys |
data.metadata | any | |
data.tags | any | |
data.started_at | string (date-time) | null | |
data.completed_at | string (date-time) | null | |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | null |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
DELETE /campaigns/{id}
Delete a campaign
Auth: API key (Authorization: Bearer). Scope: campaigns:delete.
Soft-deletes a campaign. Running or paused campaigns must be stopped first (400).
Requires one of the following scopes: campaigns:delete.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Campaign id |
Responses
204 Deleted
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
POST /campaigns/{id}/start
Start a campaign
Auth: API key (Authorization: Bearer). Scope: campaigns:execute.
Starts a campaign. Allowed from status ready, scheduled, paused, cancelled, stopped or completed.
The request fails with 400 bad_request when the campaign is in any other status, when it has no contacts, or when its voice agent is missing or does not belong to your organization.
Starting from any status other than paused resets every contact that is not completed or dnc to pending with attempts set to 0. Starting from paused resumes without resetting contacts.
Requires one of the following scopes: campaigns:execute.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Campaign id |
Idempotency-Key | header | string | Replays the stored response for a repeat within about 24 hours, with max length 255 |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.campaign | object | |
data.campaign.id | integer | |
data.campaign.name | string | |
data.campaign.description | string | null | |
data.campaign.status | string | |
data.campaign.agent_id | integer | |
data.campaign.agent | object | null | Accepts any keys |
data.campaign.schedule | object | Accepts any keys |
data.campaign.dialing | object | Accepts any keys |
data.campaign.contacts | object | Accepts any keys |
data.campaign.calls | object | Accepts any keys |
data.campaign.metadata | any | |
data.campaign.tags | any | |
data.campaign.started_at | string (date-time) | null | |
data.campaign.completed_at | string (date-time) | null | |
data.campaign.created_at | string (date-time) | |
data.campaign.updated_at | string (date-time) | null | |
data.message | string |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
409 A request with this Idempotency-Key is still being processed (code IDEMPOTENCY_CONFLICT). Retry after the original completes.
POST /campaigns/{id}/pause
Pause a campaign
Auth: API key (Authorization: Bearer). Scope: campaigns:execute.
Requires one of the following scopes: campaigns:execute.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Campaign id |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.campaign | object | |
data.campaign.id | integer | |
data.campaign.name | string | |
data.campaign.description | string | null | |
data.campaign.status | string | |
data.campaign.agent_id | integer | |
data.campaign.agent | object | null | Accepts any keys |
data.campaign.schedule | object | Accepts any keys |
data.campaign.dialing | object | Accepts any keys |
data.campaign.contacts | object | Accepts any keys |
data.campaign.calls | object | Accepts any keys |
data.campaign.metadata | any | |
data.campaign.tags | any | |
data.campaign.started_at | string (date-time) | null | |
data.campaign.completed_at | string (date-time) | null | |
data.campaign.created_at | string (date-time) | |
data.campaign.updated_at | string (date-time) | null | |
data.message | string |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
POST /campaigns/{id}/stop
Stop a campaign
Auth: API key (Authorization: Bearer). Scope: campaigns:execute.
Requires one of the following scopes: campaigns:execute.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Campaign id |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.campaign | object | |
data.campaign.id | integer | |
data.campaign.name | string | |
data.campaign.description | string | null | |
data.campaign.status | string | |
data.campaign.agent_id | integer | |
data.campaign.agent | object | null | Accepts any keys |
data.campaign.schedule | object | Accepts any keys |
data.campaign.dialing | object | Accepts any keys |
data.campaign.contacts | object | Accepts any keys |
data.campaign.calls | object | Accepts any keys |
data.campaign.metadata | any | |
data.campaign.tags | any | |
data.campaign.started_at | string (date-time) | null | |
data.campaign.completed_at | string (date-time) | null | |
data.campaign.created_at | string (date-time) | |
data.campaign.updated_at | string (date-time) | null | |
data.message | string |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
GET /campaigns/{id}/stats
Campaign statistics
Auth: API key (Authorization: Bearer). Scope: campaigns:read.
Requires one of the following scopes: campaigns:read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Campaign id |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.campaign_id | integer | |
data.status | string | |
data.contacts | object | Accepts any keys |
data.calls | object | Accepts any keys |
data.outcomes | object | Accepts any keys |
data.estimated_cost_usd | number | Omitted unless the caller may see billing. Billing is for organization owners and admins: an API key sees it only while the user who created it is an owner or admin of the key's organization (a platform super-admin creator counts as an owner), checked on every request. |
data.started_at | string | null | |
data.completed_at | string | null |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
POST /campaigns/{id}/dial
Add contacts and start dialing (one action)
Auth: API key (Authorization: Bearer). Scope: campaigns:execute.
Adds the contacts first, then starts the campaign.
If the campaign is already running it is not started again; campaign_started is false and the contacts join the active campaign. Otherwise the campaign is started under the same rules as POST /campaigns/{id}/start.
A failed start does not fail the request. The response is still 201 (200 if no contact was added) with campaign_started: false and the reason in message. The contacts stay added. Always check campaign_started.
Requires one of the following scopes: campaigns:execute.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Campaign id |
Idempotency-Key | header | string | Replays the stored response for a repeat within about 24 hours, with max length 255 |
Request body application/json required
| Field | Type | Description |
|---|---|---|
contacts | array of (string | object) required | Array of phone strings OR objects with a phone field. |
contacts[].phone | string | |
contacts[].first_name | string |
Responses
201 Contacts added (200 if none added)
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.campaign | object | |
data.campaign.id | integer | |
data.campaign.name | string | |
data.campaign.description | string | null | |
data.campaign.status | string | |
data.campaign.agent_id | integer | |
data.campaign.agent | object | null | Accepts any keys |
data.campaign.schedule | object | Accepts any keys |
data.campaign.dialing | object | Accepts any keys |
data.campaign.contacts | object | Accepts any keys |
data.campaign.calls | object | Accepts any keys |
data.campaign.metadata | any | |
data.campaign.tags | any | |
data.campaign.started_at | string (date-time) | null | |
data.campaign.completed_at | string (date-time) | null | |
data.campaign.created_at | string (date-time) | |
data.campaign.updated_at | string (date-time) | null | |
data.contacts_added | integer | |
data.contacts_failed | integer | |
data.contacts | array of object | |
data.contacts[].id | integer | |
data.contacts[].phone | string | |
data.contacts[].status | string | One of: |
data.contacts[].dnc | boolean | |
data.contacts[].error | string | |
data.campaign_started | boolean |
|
data.message | string | Says whether the campaign was started. Carries the failure reason when |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
409 A request with this Idempotency-Key is still being processed (code IDEMPOTENCY_CONFLICT). Retry after the original completes.
GET /campaigns/{id}/contacts
List contacts
Auth: API key (Authorization: Bearer). Scope: campaigns:read.
Requires one of the following scopes: campaigns:read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Campaign id |
limit | query | integer | Max items to return (1-100). Default |
offset | query | integer | Number of items to skip. Default |
status | query | string | |
outcome | query | string | |
search | query | string |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | array of object required | |
data[].id | integer | |
data[].phone | string | null | |
data[].phone_e164 | string | null | |
data[].first_name | string | null | |
data[].last_name | string | null | |
data[].email | string | null | |
data[].company | string | null | |
data[].status | string | |
data[].outcome | string | null | |
data[].attempts | integer | |
data[].max_attempts | integer | |
data[].created_at | string (date-time) | |
data[].outcome_notes | any | |
data[].last_call_duration_seconds | integer | null | |
data[].sentiment_score | number | null | |
data[].collected_data | any | |
data[].custom_data | any | |
data[].priority | integer | |
data[].source | any | |
data[].last_attempt_at | any | |
data[].completed_at | any | |
meta | object | Offset pagination metadata (in the top-level meta object). |
meta.total | integer | |
meta.limit | integer | |
meta.offset | integer | |
meta.has_more | boolean |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
POST /campaigns/{id}/contacts
Add contacts (single or batch)
Auth: API key (Authorization: Bearer). Scope: campaigns:write.
Requires one of the following scopes: campaigns:write.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Campaign id |
Request body application/json required
| Field | Type | Description |
|---|---|---|
contacts | array of object | |
contacts[].phone | string | |
contacts[].phone_number | string |
Responses
201 Contacts added (200 if some failed)
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.added | integer | |
data.failed | integer | |
data.total | integer | |
data.contacts | array of object | |
data.contacts[].id | integer | |
data.contacts[].phone | string | |
data.contacts[].status | string | One of: |
data.contacts[].dnc | boolean | |
data.contacts[].error | string |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
GET /campaigns/{id}/contacts/{contactId}
Get a contact
Auth: API key (Authorization: Bearer). Scope: campaigns:read.
Requires one of the following scopes: campaigns:read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Campaign id |
contactId | path | integer required | Contact id |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.id | integer | |
data.phone | string | null | |
data.phone_e164 | string | null | |
data.first_name | string | null | |
data.last_name | string | null | |
data.email | string | null | |
data.company | string | null | |
data.status | string | |
data.outcome | string | null | |
data.attempts | integer | |
data.max_attempts | integer | |
data.created_at | string (date-time) | |
data.outcome_notes | any | |
data.last_call_duration_seconds | integer | null | |
data.sentiment_score | number | null | |
data.collected_data | any | |
data.custom_data | any | |
data.priority | integer | |
data.source | any | |
data.last_attempt_at | any | |
data.completed_at | any |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
DELETE /campaigns/{id}/contacts/{contactId}
Remove a contact
Auth: API key (Authorization: Bearer). Scope: campaigns:write.
Requires one of the following scopes: campaigns:write.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Campaign id |
contactId | path | integer required | Contact id |
Responses
204 Removed
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
Ready to build on Vosy?
API access is included with the Business and Enterprise plans. Sign up, choose a plan with API access, and create your own keys from the Vosy API page in your account. Compare plans
Get Started