Skip to main content
POST
Create campaign
Use this endpoint to create a new campaign.

Endpoint

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

Request Body

Notes

  • All fields (agent_id, campaign_name, description, start_date, end_date, max_retry) are required.
  • campaign_name must be unique within a workspace.
  • max_retry cannot be greater than 50.
  • max_delay is required when max_retry is greater than 1. It must be passed as a JSON string (not an object) with keys d (days), h (hours), and m (minutes) as numbers. Example: "{\"d\":1,\"h\":2,\"m\":30}".
  • start_date and end_date must be in YYYY-MM-DD format (e.g., "2025-12-01").

Example cURL

Headers

token
string
required

API token for authentication

Body

application/json
agent_id
integer
required

Voice agent to use for this campaign

campaign_name
string
required

Name of the campaign. Must be unique within a workspace.

description
string
required

Description of the campaign

start_date
string<date>
required

Campaign start date in YYYY-MM-DD format (e.g. 2025-12-01)

end_date
string<date>
required

Campaign end date in YYYY-MM-DD format (e.g. 2025-12-31)

max_retry
integer
required

Maximum number of retry attempts (cannot be greater than 50)

Required range: 1 <= x <= 50
max_delay
string

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

Response

Campaign created successfully