Edit an Outbound Campaign
Edit an outbound campaign.
Request URL
POST {base_url}/{api_path}/outbound_call_center/update?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The unique ID of an outbound campaign. Note: You can query
outbound campaign's ID using the Query Outbound Campaign List
interface. |
| max_attempts | No | Integer | The new maximum number of attempts for a single contact. Valid values: 1 to 99. |
| max_call | No | Integer | The new 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. |
| name | No | String | The new name of the campaign. Maximum length: 127 characters. The name must be unique. |
| requeue_time | No | Integer | The new requeue time of unanswered calls, in minutes. Valid values: 1 to 99. |
| ring_timeout | No | Integer | The new ring timeout of calls, in seconds. |
| source | No | String | The new source of the campaign contacts. Valid value:
|
| start_time | No | String | The new start time of the campaign, in the format yyyy-mm-dd hh:mm:ss. The time must be earlier than end_time. |
| dialer_mode | No | String | The new dialer mode of the campaign. Valid value:
|
| end_time | No | String | The new end time of the campaign, in the format yyyy-mm-dd hh:mm:ss. The time must be later than start_time. |
| campaign_time | No | Array<Campaign_Time> | The new 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 new destination type of the campaign. Note: This
field is required when dialer_mode is agentless. Valid value:
|
| destination_value | No | String | The new 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 new 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 new 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 new 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 new 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 new 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:
|
| number_type | No | String | The new type of the contact numbers to dial. Note: This
field is required when source is import or phonebook. Valid value:
|
| order_by | No | String | Define the display order. Valid value:
|
| outbound_queue | No | Integer | The new 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 new number of times the prompt is played. Valid values: 1 to 5. Note: This field is required when destination_type is
play_greeting. |
| sort_by | No | String | Define the sorting field. Valid value:
|
| source_value | No | String | The new 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 new time condition of the campaign. Valid value:
|
- 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.
|
Example
Request example
POST /openapi/v1.0/outbound_call_center/update?access_token=xVx9wX2B38gSD0C2o4y9b9bd5QOPz2MK HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
"id": 14,
"name": "API Test Campaign Edited"
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS"
}