v45

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-0114775543.6 KB
Campaigns

Create a campaign

Create a campaign

post/campaign

Request body

namestring required

The name of the campaign

descriptionstring

The description of the campaign

audienceIdstring required

The ID of the audience

agentIdstring required

The ID of the agent

phoneNumberIdsstring[]

Optional list of caller-ID phone number IDs to rotate across when placing outbound calls for this campaign. If omitted, the agent's default phone number is used.

scheduledAtstring date-time

Optional ISO-8601 timestamp for when the campaign should start dialing. Must be in the future. If provided, the campaign is created in scheduled status; otherwise it starts in draft status and must be started manually.

maxRetriesinteger

Maximum number of times a failed call is retried before the participant is marked as failed. 0 disables retries.

retryDelayinteger

Delay in minutes between retry attempts for a failed call.

Example request

{
  "name": "My Campaign",
  "description": "This is a campaign to test the API",
  "audienceId": "60d0fe4f5311236168a109ca",
  "agentId": "60d0fe4f5311236168a109ca",
  "phoneNumberIds": [
    "60d0fe4f5311236168a109cb"
  ],
  "scheduledAt": "2026-04-24T10:00:00.000Z",
  "maxRetries": 3,
  "retryDelay": 15
}

Response

Campaign created successfully. Note: the response is the raw Mongoose document — agentId and audienceId are plain ObjectId strings here, not nested objects as returned by GET endpoints.

statusboolean

Example response

{
  "status": true
}