Skip to main content
POST
Update campaign
Use this endpoint to update an existing campaign.

Endpoint

POST /update-campaign Content-Type: application/json Authentication: Required (workspace auth)

Request Body

To update a campaign, send its id and any fields you want to change.

Notes

  • id is required — it identifies the campaign to update.
  • Only the fields you send are updated.
  • campaign_status accepts a string value: draft, inprogress, hold, or pause.
  • max_delay must be passed as a JSON string with keys d (days), h (hours), and m (minutes) as numbers.
  • start_date and end_date must be in YYYY-MM-DD format (e.g., "2025-12-05").
  • max_retry cannot be greater than 50.

Conditions Format

The conditions field accepts an array of groups. Each group contains rules that are evaluated together. Structure: Each rule: Allowed operators: Logic:
  • Rules within the same group are joined with AND.
  • Groups are joined with each other using the join field ("OR" or "AND").
Example — single condition:
This means: status == “active” Example — multiple conditions with AND (same group):
This means: status == “active” AND region == “US” Example — two groups with OR:
This means: (status == “active” AND region == “US”) OR (priority == “high”) To clear conditions, send "conditions": null.

Example cURL

Headers

token
string
required

API token for authentication

Body

application/json
id
integer
required

Campaign ID to update

agent_id
integer

Updated voice agent to use for this campaign

campaign_name
string

Updated campaign name (must remain unique within workspace)

description
string

Updated description

start_date
string<date>

Updated start date in YYYY-MM-DD format (e.g. 2025-12-05)

end_date
string<date>

Updated end date in YYYY-MM-DD format (e.g. 2026-01-05)

max_retry
integer

Updated maximum retry attempts (cannot be greater than 50)

Required range: x <= 50
max_delay
string

Delay between retries as a JSON string. Keys: d (days), h (hours), m (minutes) with numeric values. Example: {"d":1,"h":2,"m":30}

campaign_status
enum<string>

Updated campaign status.

Available options:
draft,
inprogress,
hold,
pause
conditions
object[]

Condition groups with AND/OR logic. Each group contains rules joined by AND. Groups are joined by the 'join' field (OR or AND).

Response

Campaign updated successfully