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>"
}
ended and cancelled are terminal states. Once a campaign reaches either state, it cannot be modified.

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 or workflow app

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 app

Available options:
agent,
workflow
app_version
integer | null

Version of the app to use

updated_by
string | null

User who last updated this resource