Create a campaign

Creates a draft campaign. config, schedule, and retry_policy are free-form JSON objects owned by the orchestrator (caller-id, call window, retry attempts/backoff). Add recipients with POST /v1/campaigns/{id}/targets, then start it.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
channelenumRequired
Allowed values:
agent_idstringOptional
configmap from strings to anyOptional
schedulemap from strings to anyOptional
retry_policymap from strings to anyOptional

Response

Campaign created (draft)

idstringOptional

camp_{nanoid}

workspace_idstringOptional
channelenumOptional
agent_idstringOptional
statusenumOptional
configmap from strings to anyOptional

Channel payload template (caller-id, call window, webhook). Shape owned by the orchestrator.

schedulemap from strings to anyOptional
retry_policymap from strings to anyOptional

Retry attempts + backoff (max_attempts, backoff_seconds, backoff_multiplier). Absent = no retries.

countersobjectOptional

Live progress counts. total = queued + dispatched + succeeded + failed.

created_atdatetimeOptional
updated_atdatetimeOptional
started_atdatetimeOptional
completed_atdatetimeOptional
retryable_failedintegerOptional

Count of targets the Retry failed action would re-queue (genuine dial failures, excluding suppression terminals). Present for completed/paused campaigns; omitted when 0.

Errors

400
Create Campaign Request Bad Request Error
401
Create Campaign Request Unauthorized Error