Pause campaign
Pauses a running campaign and returns it with status: paused: no new contact is called, the calls already in progress end normally. Start it again with POST /campaigns/{campaign_id}/start and it resumes with the contacts not called yet. A draft campaign cannot be paused and a completed one cannot be paused again: both give 409 invalid_campaign_state. With a test key nothing is paused: the response has status: simulated. Required scope: campaigns:write. With a test key (vx_test_) it is simulated: nothing real happens and nothing is billed. Requires an Idempotency-Key header. Retriable: when the operation itself fails with a 429, a 5xx or a temporary 409, the key is released and a retry with the same key runs the operation again; with no response at all, a retry with the same key returns the first outcome or runs the operation again. A 429 rate_limited from the request limit and 409 request_in_progress come before the operation and leave the key as it is: retry with the same key.
Authentication
Path parameters
Id of the campaign, as returned by POST /campaigns or GET /campaigns.
Headers
API version for this request; defaults to the version the key is pinned to.
A unique value you generate for each new operation (16 to 64 letters, digits, hyphen or underscore; a UUID works). Repeating the same request with the same key within 24 hours returns the first response and does nothing again, when that response was a success or a 4xx error the same request would always get again (not 429, and not the temporary 409 codes request_in_progress, caller_has_active_call and caller_request_in_progress: for those, and for a 5xx, see the note on retrying in the operation); the same key with a different request is refused with idempotency_key_reused.
Response
Always campaign.
Id of the campaign: use it in GET /campaigns/{campaign_id} and in the other campaign operations.
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.
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.
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).
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.