Create campaign description

Programmatically create a new outbound Dialer campaign.

📢

This legacy information is part of v1, v2, or v3, which will be supported only until March 31, 2027. To avoid disruption, migrate your integration to v4 before that date. For endpoint mappings, Bearer token authentication, and scoped API key guidance, see the Migrating to v4 article in the Developer's Guide.

Please refer to the detailed API endpoint specification: Create a new campaign

What you can achieve with the Create campaign API

This API enables you to programmatically create a new outbound Dialer campaign by defining its dialing strategy, dialing parameters, Caller ID settings, redial rules, and assigned agents.

User permissions required

  • Create campaigns

Prerequisites

  • You must provide all required campaign configuration values.
  • Assigned agent e mail addresses must match users that exist in your contact center.
  • Some parameters are available only if the related feature is enabled for your contact center.

Making requests

The Create campaign API requires the Base URL (cluster_id) and the contact center API key as a bearer token in the request header.

Endpoint

POST /api/dialer/v1/campaigns

Authentication

Include the bearer token in the request header:

Authorization: Bearer YOUR_API_KEY

This is a POST request with a JSON body defining the campaign configuration.

Request body parameters

ParameterDescriptionTypeRequiredNotes
nameThe name of the campaign.stringYes
strategyThe campaign strategy type.stringOptionalValid values: simple, predictive_ai. predictive_ai is available only if Dialer AI is enabled.
dialing_orderThe order in which contacts are dialed for live campaigns.stringOptionalAvailable only if the Dialing order feature is enabled. Valid values: disabled, oldest_first, newest_first. Default: disabled.
dial_levelThe number of parallel attempts to dial a contact for one available agent.integerOptional
dial_level_overrideSettings for overriding the dial level based on the number of active agents.objectOptionalSee Dial level override object.
max_dial_timeMaximum time in seconds to spend dialing a contact.integerOptional
max_wait_timeMaximum time in seconds to wait for an agent when a contact answers.integerOptional
max_dial_attemptsMaximum number of attempts to dial a contact.integerOptional
voice_messageName of an audio file that will be played as a voice message.stringOptional
answering_machine_detectionWhether Answering Machine Detection is enabled.booleanOptional
liveWhether or not the campaign type is live.booleanOptional
survey_enabledWhether the contact can rate the call after the call ends.booleanOptionalDefault: false.
local_time_settingsTime window and weekday rules for calling contacts.objectOptionalAvailable only if Dialer contact local time is enabled. See Local time settings object.
caller_id_setsCaller ID sets for the campaign.arrayOptionalSee Caller ID sets array.
local_caller_idWhether to use only Caller IDs that match the destination country or region.booleanOptional
redial_rulesRules for redialing contacts based on call outcomes.objectOptionalSee Redial rules object.
assigned_agentsList of agent e mail addresses assigned to the campaign.arrayOptionalEach value must be a valid e mail address.

Dial level override object

FieldDescriptionTypeRequired
enabledWhether dial level override is enabled.booleanOptional
override_valueDial level to use when the number of active agents drops to the threshold value.numberOptional
active_agents_thresholdNumber of active agents at which to apply the override.integerOptional

Local time settings object

FieldDescriptionTypeRequired
call_fromTime of day when calls can start.stringOptional
call_toTime of day when calls must stop.stringOptional
week_daysDays of the week when calls can be made.arrayOptional

Valid week_days values: Mon, Tue, Wed, Thu, Fri, Sat, Sun

Caller ID sets array

Each array element contains:

FieldDescriptionTypeRequired
numbersPhone numbers assigned to the Caller ID set.arrayOptional

Redial rules object

redial_rules groups rules by call outcome. Each outcome contains an array of rule objects.

Supported outcomes:

  • machine_answered
  • abandoned
  • no_answer
  • rejected
  • failed
  • busy

Each outcome array element contains:

FieldDescriptionTypeRequired
unitsTime units for the rule.stringOptional
waitMaximum time to wait before redialing.integerOptional
change_calleridWhether to switch the Caller ID set when redialing.booleanOptional

Valid units values: s, m, h


Request example

{
  "method": "POST",
  "url": "https://cluster1.contact_center_name.com/api/dialer/v1/campaigns",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY"
  },
  "body": {
    "name": "Q4 Inbound Lead Follow up",
    "strategy": "simple",
    "dialing_order": "oldest_first",
    "dial_level": 1,
    "dial_level_override": {
      "enabled": true,
      "override_value": 1.5,
      "active_agents_threshold": 3
    },
    "max_dial_time": 60,
    "max_wait_time": 5,
    "max_dial_attempts": 3,
    "answering_machine_detection": true,
    "survey_enabled": false,
    "local_time_settings": {
      "call_from": "08:00",
      "call_to": "22:00",
      "week_days": ["Mon", "Tue", "Wed", "Thu", "Fri"]
    },
    "caller_id_sets": [
      {
        "numbers": ["100"]
      }
    ],
    "local_caller_id": false,
    "redial_rules": {
      "no_answer": [
        { "units": "s", "wait": 600, "change_callerid": true }
      ],
      "busy": [
        { "units": "m", "wait": 10, "change_callerid": false }
      ]
    },
    "assigned_agents": ["[email protected]", "[email protected]"]
  }
}

Notes:

  • caller_id_sets is an array. Each item contains a numbers array.
  • redial_rules is an object keyed by outcome. Each outcome contains an array of rule objects.

Response

A successful response returns the created campaign object, including the campaign id and the configuration values that were created.

ElementDescriptionType
idThe unique identifier of the campaign.integer
nameThe name of the campaign.string
strategyThe campaign strategy type.string
dialing_orderThe dialing order setting.string
dial_levelDial level value.integer
dial_level_overrideDial level override configuration.object
max_dial_timeMaximum dial time in seconds.integer
max_wait_timeMaximum wait time in seconds.integer
max_dial_attemptsMaximum dial attempts.integer
voice_messageVoice message name.string
answering_machine_detectionWhether Answering Machine Detection is enabled.boolean
liveWhether or not the campaign type is live.boolean
survey_enabledWhether post call survey is enabled.boolean
local_time_settingsLocal time calling rules.object
caller_id_setsCaller ID sets.array
local_caller_idWhether local Caller ID selection is enabled.boolean
redial_rulesRedial rules by outcome.object
assigned_agentsAssigned agent e mail addresses.array

Response sample

{
  "id": 98765,
  "name": "Q4 Inbound Lead Follow up",
  "strategy": "simple",
  "dialing_order": "oldest_first",
  "dial_level": 1,
  "dial_level_override": {
    "enabled": true,
    "override_value": 1.5,
    "active_agents_threshold": 3
  },
  "max_dial_time": 60,
  "max_wait_time": 5,
  "max_dial_attempts": 3,
  "voice_message": "Voice message (1)",
  "answering_machine_detection": true,
  "live": false,
  "survey_enabled": false,
  "local_time_settings": {
    "call_from": "08:00",
    "call_to": "22:00",
    "week_days": ["Mon", "Tue", "Wed", "Thu", "Fri"]
  },
  "caller_id_sets": [
    {
      "numbers": ["100"]
    }
  ],
  "local_caller_id": false,
  "redial_rules": {
    "no_answer": [
      { "units": "s", "wait": 600, "change_callerid": true }
    ],
    "busy": [
      { "units": "m", "wait": 10, "change_callerid": false }
    ]
  },
  "assigned_agents": ["[email protected]", "[email protected]"]
}

Errors

CodeMessageDescription
401UnauthorizedThe API key specified is invalid.
403ForbiddenNo access.
422Unprocessable EntityValidation error. Response includes an errors object with details per field.

Validation error example (422)

{
  "errors": {
    "name": ["can't be blank"]
  }
}

See also