Update a campaign
Change a campaign's settings, under the campaign page's rules. A DRAFT can change anything. A SCHEDULED, RUNNING or PAUSED campaign can change only name, fromNumber, numberPool, maxConcurrency, maxCallsPerHour, spendCapCents, autoEnroll and routeReturnCalls (others are refused as draft_only, and the numbers never to none, number_pool_empty), and in its sequence only wording, voicemails, delays, retry gaps, double dial and converted outcomes (others are refused as sequence_locked). A COMPLETED or CANCELLED campaign can change only convertedOutcomes and routeReturnCalls. Pass only what changes; null clears brief, greetingOverride, fromNumber (with the pool, on a draft), callingWindow, smsWindow, voicemail, spendCapCents and maxCallsPerHour. Raise spendCapCents here before resuming a campaign its cap paused.
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Path Parameters
Workspace slug (GET /me lists yours).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X PATCH "https://example.com/workspaces/string/campaigns/string" \ -H "Content-Type: application/json" \ -d '{}'{
"campaign": {
"id": "string",
"name": "string",
"status": "string",
"agentId": "string",
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Stop calling a recipient POST
Stop one recipient on a SCHEDULED, RUNNING or PAUSED campaign so the dialer never calls them again. A recipient waiting to be called becomes cancelled with the outcome stopped. If their call is in progress it finishes normally: a call that connects keeps its result, and any other ends as cancelled, stopped, with no retry. It does not add the number to the do-not-call list.
Create a contact POST
Add one contact by phone number, with an optional name, tags and field values. A number that is already a contact is refused as contact_exists; use update_contact. A number that has called one of the workspace's agents is refused as consent_required unless consentConfirmed is true: you confirm the person agreed to be kept as a contact. Callers are never added automatically. Tags are stored lower case, without commas, at most 40 characters each and 50 a contact.