v1

latestOpenAPI 3.0.12026-07-226992320.0 KB
Campaigns

Create Campaign

Creates an outbound call campaign with the specified agent, caller number, and CSV contact list. Set isScheduled=true with scheduledDate, scheduledTime, and scheduledTimezone to defer launch. Returns the created campaign, including its campaignId.

post/v1/campaigns

Response

Created

campaignIdstring

Unique identifier for this campaign. Use this value as campaignId when updating, deleting, or triggering this campaign via the API.

campaignNamestring

Display name of this campaign as set at creation time. Used to identify the campaign in listings and dashboards.

campaignStatus'live' | 'scheduled' | 'paused' | 'completed'

Current lifecycle state of the campaign. 'live' means the campaign is actively dialling contacts. 'scheduled' means the campaign is configured to launch at a future date and time. 'paused' means dialling has been suspended and can be resumed. 'completed' means all contacts have been dialled and the campaign has finished.

scheduledDatestring date-time

The date and time when this campaign is scheduled to launch, including timezone. Present only when isScheduled is true. Null for campaigns that started immediately at creation.

concurrentCallsinteger

Maximum number of calls allowed to be active simultaneously in this campaign. Determines dialling throughput — higher values dial more contacts in parallel. Reflects the value set at creation or last updated via the update endpoint.

errorsstring[]

List of validation errors encountered when processing the campaign's contact CSV file. Present only when the upload contained rows with invalid phone numbers or missing required variables. Null or empty when the file was processed without errors.

scheduledboolean

Example response

{
  "campaignId": "camp_XiQEBcj9cc5TFRB4",
  "campaignName": "Q4 Outreach Campaign",
  "campaignStatus": "live",
  "scheduledDate": "2025-09-25T19:00:00.000Z",
  "concurrentCalls": 5,
  "agent": {
    "name": "New AI Agent",
    "agentId": "agent_D5D0p7TUs66TTAEAx",
    "status": "Live"
  },
  "phoneNumber": {
    "sipPhoneNumber": "+14155552671",
    "provider": "twilio",
    "inboundAgentId": "agent_D5D0p7TUs66TTAEAx",
    "outboundAgentId": "agent_D5D0p7TUs66TTAEAx",
    "outboundPhoneNumber": "+14155552671",
    "active": true,
    "terminationSipURI": "sip.telnyx.com",
    "friendlyName": "Support Line - US"
  },
  "errors": [
    "Row 3: missing required variable 'customer_name'",
    "Row 7: invalid phone number '+1234'"
  ]
}