Calls & Campaigns
Update Campaign Status
Update the status of a campaign (draft, active, paused, completed, cancelled)
PATCH
Update Campaign Status
Update the status of a campaign to control its lifecycle. Activates , pause, complete, or cancel campaigns.Endpoint
Path parameters
The unique identifier of the campaign.
Request headers
Bearer token for authentication. Format:
Bearer talq_your_environment_token_hereApplication JSON. Format:
application/jsonRequest body
New status for the campaign. Options:
draft, active, paused, completed, cancelled.Valid Status Values
| Status | Description |
|---|---|
draft | Campaign is in draft mode and not yet active |
active | Campaign is running and making calls |
paused | Campaign is paused and not making new calls |
completed | Campaign has finished all scheduled calls |
cancelled | Campaign was cancelled and will not make more calls |
Example requests
Response
Success Response (200 OK)
Response fields
Indicates if the operation was successful.
Success message describing the operation.
Updated campaign status data.
Error responses
404 Not Found
422 Validation Error
400 Bad Request
401 Unauthorized
403 Forbidden
500 Server Error
Error codes
| Code | Description | HTTP Status |
|---|---|---|
CAMPAIGN_NOT_FOUND | Specified campaign does not exist | 404 |
VALIDATION_ERROR | Invalid status value provided | 422 |
INVALID_TRANSITION | Invalid status transition attempted | 400 |
INVALID_TOKEN | Authentication token is invalid or missing | 401 |
FORBIDDEN | Cannot update campaign status | 403 |
SERVER_ERROR | Internal server error occurred | 500 |
Status Transition Rules
| Current Status | Allowed Transitions |
|---|---|
draft | active, cancelled |
active | paused, completed, cancelled |
paused | active, completed, cancelled |
completed | None (final state) |
cancelled | None (final state) |
Important notes
Status transitions. Not all status transitions are allowed. See the transition rules above.
Final states. Once a campaign reaches
completed or cancelled status, it cannot be changed.Active campaigns. Activating a campaign will start making calls according to the schedule.
Related endpoints
- Get Campaign:
GET /api/v1/campaigns/{campaign_id} - Update Campaign:
PUT /api/v1/campaigns/{campaign_id} - Create Campaign:
POST /api/v1/campaigns - Delete Campaign:
DELETE /api/v1/campaigns/{campaign_id} - List Campaigns:
GET /api/v1/campaigns