PUT
/
v1
/
orgs
/
{org_id}
/
workspaces
/
{workspace_id}
/
campaigns
/
{campaign_id}
/
status
Update Campaign Status
curl --request PUT \
  --url https://apps.sarvam.ai/api/scheduling/v1/orgs/{org_id}/workspaces/{workspace_id}/campaigns/{campaign_id}/status \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "action": "pause"
}
'
{
  "name": "<string>",
  "campaign_id": "<string>",
  "status": "ended",
  "app_id": "<string>",
  "created_by": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "app_type": "agent",
  "app_version": 123,
  "updated_by": "<string>"
}
Triggers an explicit status transition on a campaign by sending an action. ended and cancelled are terminal — once reached, no further transitions are possible. A campaign reaches ended automatically when its end_timestamp passes.

Transitions

ActionAllowed fromResulting Status
pausescheduled, activepaused
resumepausedscheduled
cancelscheduled, active, pausedcancelled

Actions

  • pause — Temporarily stops call dispatch. The campaign retains its queue; calls resume when you send resume. Use this before editing a campaign via PATCH /campaigns/{id}.
  • resume — Restarts dispatch from where it left off. Status returns to scheduled and activates automatically if within the campaign window.
  • cancel — Permanently stops the campaign. All pending calls are dropped. This cannot be undone.
To make changes to an active campaign: pause → update → resume. Pausing is instant and does not lose any queue state.

Authorizations

X-API-Key
string
header
required

Path Parameters

org_id
string
required
workspace_id
string
required
campaign_id
string
required

Body

application/json
action
enum<string>
required

The new status to set for the campaign

Available options:
pause,
resume,
cancel

Response

Successful Response

Summary metadata for a campaign, returned in list responses.

name
string
required

Name of the resource

campaign_id
string
required

Unique identifier for the campaign

status
enum<string>
required

Current status

Available options:
ended,
active,
paused,
scheduled,
cancelled
app_id
string
required

ID of the agent

created_by
string
required

User who created this resource

created_at
string<date-time>
required

Timestamp when the resource was created (ISO 8601)

updated_at
string<date-time>
required

Timestamp when the resource was last updated (ISO 8601)

description
string | null

Optional description

app_type
enum<string>
default:agent

Type of agent

Available options:
agent
app_version
integer | null

Version of the agent to use

updated_by
string | null

User who last updated this resource