Add an Outbound Campaign
Add an outbound campaign.
Request URL
POST {base_url}/{api_path}/outbound_call_center/create?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| dialer_mode | Yes | String | The dialer mode of the campaign. Valid value:
|
| end_time | Yes | String | The end time of the campaign, in the format yyyy-mm-dd hh:mm:ss. The time must be later than start_time. |
| max_attempts | Yes | Integer | The maximum number of attempts for a single contact. Valid values: 1 to 99. |
| max_call | Yes | Integer | The number of concurrent calls of the campaign. Valid values: 1 to 99. The sum of concurrent calls of all running campaigns plus this value cannot exceed the licensed channel limit. |
| requeue_time | Yes | Integer | The requeue time of unanswered calls, in minutes. Valid values: 1 to 99. |
| ring_timeout | Yes | Integer | The ring timeout of calls, in seconds. |
| source | Yes | String | The source of the campaign contacts. Valid value:
|
| start_time | Yes | String | The start time of the campaign, in the format yyyy-mm-dd hh:mm:ss. The time must be earlier than end_time. |
| order_by | Yes | String | Define the display order. Valid value:
|
| sort_by | Yes | String | Define the sorting field. Valid value:
|
| name | No | String | The name of the campaign. Maximum length: 127 characters. The name must be unique. |
| campaign_time | No | Array<Campaign_Time> | The custom office hours of the campaign. Note: This field
is required when time_condition is route_scope, with at least one group of office
hours. |
| destination_type | No | String | The destination type of the campaign. Note: This field is
required when dialer_mode is agentless. Valid value:
|
| destination_value | No | String | The value of the destination. Maximum length: 100 characters. Note: This field is required when destination_type is ivr, which
specifies the ID of an existing IVR; when destination_type is play_greeting, it
specifies the name of an existing custom prompt. |
| dial_rate | No | Number | The dial rate of the campaign. Note: This field takes
effect only when dialer_mode is power, with a value from 1 to 9 and up to 1
decimal place.
Note: This field is required when dialer_mode is
power. |
| disposition_code | No | String | The ID(s) of the disposition codes for the campaign, separated by a comma. The disposition codes must exist. You can query the available values using the GET /openapi/v1.0/system/get_menuoptions interface. |
| dnc_ids | No | String | The ID(s) of the DNC lists associated with the campaign, separated by a comma. The DNC lists must exist. You can query the available values using the GET /openapi/v1.0/dnc/list interface. |
| dod | No | String | The ID(s) of the DOD numbers of the campaign, separated by a comma. This field takes effect when enb_set_dod is 1. The DOD numbers must exist. You can query the available values using the GET /openapi/v1.0/system/get_menuoptions?menu=trunk_campaign_dod_id interface. |
| dod_prefix | No | String | The DOD prefix of the campaign. This field takes effect when enb_set_dod is 1. Maximum length: 7 characters. |
| enb_agent_add | No | Integer | Whether to allow agents to add numbers to a DNC list. When set to 1,
target_list is required, and only manually-created DNC lists are allowed. Valid value:
|
| enb_masked_number | No | Integer | Whether to mask the numbers of contacts. Valid value:
|
| enb_record | No | Integer | Whether to enable call recording. Valid value:
|
| enb_set_dod | No | Integer | Whether to enable the DOD number display. Valid value:
|
| is_force | No | Integer | Whether to force save the campaign. By default, the campaign creation is
blocked when time_condition is global and no office hours are configured for the
default time zone. Set this field to 1 to skip the check. Valid value:
Default value: 0. |
| number_type | No | String | The type of the contact numbers to dial. Note: This field
is required when source is import or phonebook. Valid value:
|
| outbound_queue | No | Integer | The ID of the outbound queue associated with the campaign. The queue must
exist. Note: This field is required when dialer_mode is
progressive or power. You can query the available values using the GET
/openapi/v1.0/outbound_queue/list interface. |
| play_times | No | Integer | The number of times the prompt is played. Valid values: 1 to 5. Note: This field is required when destination_type is
play_greeting. |
| source_value | No | String | The value of the contact source. When source is import, it is the file name returned by the Upload a Contact File interface; when source is phonebook, it is the phonebook ID. Maximum length: 255 characters. |
| target_list | No | String | The ID(s) of the target DNC lists to which agents can add numbers, separated by
a comma. The DNC lists must exist. Note: This field is
required when enb_agent_add is 1, and only manually-created DNC lists are
allowed. You can query the available values using the GET
/openapi/v1.0/dnc/list interface. |
| time_condition | No | String | The time condition of the campaign. Valid value:
Default value: global. |
- Campaign_Time
-
Parameter Type Description days_of_week String The days of the week when the office hours take effect. Separate multiple days with a space, using the lowercase abbreviations: mon, tue, wed, thu, fri, sat, and sun. office_times Array<Option_Param> The list of office time ranges. Each item specifies an office time range in the value field, in the format HH:mm-HH:mm.
- Option_Param
-
Parameter Type Description value String The office time range, in the format HH:mm-HH:mm. The end time must be later than the start time.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| id | Integer | The unique ID of the newly created outbound campaign. |
Example
Request example
POST /openapi/v1.0/outbound_call_center/create?access_token=xVx9wX2B38gSD0C2o4y9b9bd5QOPz2MK HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
"name": "API Test Campaign",
"dialer_mode": "progressive",
"source": "phonebook",
"source_value": "12",
"number_type": "mobile_number",
"outbound_queue": 8024,
"start_time": "2026-11-12 09:00:00",
"end_time": "2026-11-20 18:00:00",
"max_attempts": 3,
"max_call": 2,
"requeue_time": 30,
"ring_timeout": 30,
"sort_by": "first_name",
"order_by": "asc"
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"id": 14
}