Skip to navigation

Get campaign

Returns one campaign with its agent, calling window, status and statistics. status tells whether it is running, paused or completed; when the platform paused it, paused_reason says why. For a campaign created in the app without declaring where the right to call comes from, contact_origin is null and the campaign cannot be started through the API. Required scope: campaigns:read. With a test key (vx_test_) it behaves exactly as with a live key and consumes nothing.

Authentication

AuthorizationBearer
API key created by an Owner or Admin of the organization. Never in the query string.

Path parameters

campaign_idstringRequiredformat: "uuid"

Id of the campaign, as returned by POST /campaigns or GET /campaigns.

Headers

VoxAI-VersionenumOptional

API version for this request; defaults to the version the key is pinned to.

Allowed values:

Response

Successful response.
object"campaign"

Always campaign.

idstringformat: "uuid"

Id of the campaign: use it in GET /campaigns/{campaign_id} and in the other campaign operations.

namestring
The name given to the campaign.
statusenum

draft: created and not started yet. running: the campaign is calling its contacts. paused: stopped, it can be started again with POST /campaigns/{campaign_id}/start. completed: finished, it cannot be started or paused again. simulated: only with a test key, nothing was changed.

Allowed values:
paused_reasonenum

Set when the platform, and not you, paused the campaign; null otherwise. feature_not_available: the platform paused the campaign because the plan no longer includes outbound campaigns. agent_suspended: the agent was suspended; resuming it restarts the campaign.

Allowed values:
agentobject
The agent that makes the calls of the campaign.
max_concurrencyinteger
Calls the campaign can make at the same time. The plan limit of concurrent calls still applies.
calling_hoursobject
The daily window of the campaign. The effective window is its intersection with the organization window.
contact_originobject or null

The declaration made when the campaign was created; null for a campaign created in the app without one (it cannot be started through the API).

statsobject
Counts of the contacts of the campaign, updated as the calls proceed.
simulatedboolean

true with a test key: the operation was only checked and nothing was changed. After POST /campaigns with a test key the id does not exist.

created_atdatetime
When the campaign was created, ISO 8601 UTC.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error