Skip to main content
POST
Create campaign

Authorizations

X-API-KEY
string
header
required

Body

application/json
name
string
required
campaign_type
enum<string>
default:voice
Available options:
voice,
whatsapp,
whatsapp_voice
voice_agent_id
string

Required for voice and whatsapp_voice. Must reference a published voice agent.

whatsapp_agent_id
string

Required for whatsapp and whatsapp_voice.

from_phone_number_id
string

Outbound caller-ID (BYON) number to dial from. Only applies to voice-dialing types (voice, whatsapp_voice); ignored for whatsapp. Must reference an active, outbound-enabled number in the workspace. Omit to use the platform default caller ID.

whatsapp_sender_id
string

WhatsApp sender (BYON) to send from. Only applies to WhatsApp-sending types (whatsapp, whatsapp_voice); ignored for voice. Must reference an active sender in the workspace. Omit to use the platform default sender.

timezone
string
default:Asia/Kolkata

IANA timezone the campaign's business hours are evaluated in; it also sets the agent's clock. Omit it, or send it blank, for Asia/Kolkata. A name that is not a valid IANA timezone is treated as Asia/Kolkata.

description
string
schedule
object

Business hours, retry policy and voice throttles. All fields optional. NOTE: only max_concurrent_calls and max_dials_per_second are validated at create time (against your workspace limits, else 400); the other numeric fields are clamped to their documented range at execution rather than rejected.

workflow
object

Channel-specific config. Voice-only campaigns ignore it. For WhatsApp-sending types, workflow.whatsapp sets the follow-up cadence.

variables_schema
object

Advisory declaration of the per-recipient variables this campaign expects (for your own documentation / UI). Stored and echoed back but NOT validated against recipient rows — substitution uses each recipient's own variables map.

metadata
object

Opaque JSON stored with the campaign and echoed back verbatim. Use it for your own correlation ids / tags.

Response

Created campaign (status draft)