Campaigns
Campaigns

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.

PATCH
/workspaces/{workspace}/campaigns/{campaign}

Authorization

bearerAuth
AuthorizationBearer <token>

A personal access token from Settings > API tokens.

In: header

Path Parameters

workspace*string

Workspace slug (GET /me lists yours).

campaign*string

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
}