Add a DNC List

Add a call blacklist with its members.

Request URL

POST {base_url}/{api_path}/dnc/create?access_token={access_token}

Request parameters

Parameter Required Type Description
name Yes String The name of the call blacklist. Maximum length: 127 characters. The name must be unique.
enb_default_choose No Integer Whether to select the call blacklist by default when creating an outbound campaign.

Valid value:

  • 0: Disabled.
  • 1: Enabled. Default value: 0.
members No Array<Dnc_Member> The members of the call blacklist, up to 1000 members per request.
phonebook_ids No String The unique ID(s) of the phonebooks to import, separated by a comma.
Note:
  • You can query phonebook's ID using the Query Phonebook List interface.
  • This field takes effect when source is phonebook.
source No String The source of the numbers.

Valid value:

  • manually: Added manually.
  • phonebook: Imported from phonebooks. Default value: manually.
Note:

The name must be unique. The number of call blacklists is limited by the platform capacity, and the number of members is limited by the member capacity.

Dnc_Member
Parameter Type Description
number_list Array<Number_List> The number list of the member. At least one number is required.
first_name String The first name of the member. Maximum length: 63 characters. Either first_name or last_name is required.
last_name String The last name of the member. Maximum length: 63 characters. Either first_name or last_name is required.
company String The company of the member. Maximum length: 127 characters.
email String The email address of the member, in a complete email format. Maximum length: 255 characters.
industry String The industry of the member. Maximum length: 127 characters.
job_title String The job title of the member. Maximum length: 127 characters.
organization String The organization of the member. Maximum length: 127 characters.
position String The position of the member. Maximum length: 127 characters.
report_to String The person whom the member reports to. Maximum length: 127 characters.
remark String The remark of the member. Maximum length: 1023 characters.
street String The street of the member's address. Maximum length: 255 characters.
city String The city of the member's address. Maximum length: 255 characters.
state String The state of the member's address. Maximum length: 255 characters.
country String The country of the member's address. Maximum length: 255 characters.
zip_code String The zip code of the member's address. Maximum length: 255 characters.
Number_List
Parameter Type Description
num_type String The type of the number.
  • business_number: Business number.
  • business_number2: Business number 2.
  • business_fax: Business fax.
  • mobile_number: Mobile number.
  • mobile_number2: Mobile number 2.
  • home_number: Home number.
  • home_number2: Home number 2.
  • home_fax: Home fax.
  • other_number: Other number.
number String The number. Maximum length: 31 characters. Only letters, numbers, spaces, and ( ) . - + * # are allowed.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
id Integer The unique ID of the call blacklist.

Example

Request example

POST /openapi/v1.0/dnc/create?access_token=w3rTvBskMgZ1XpQd7NhLc0eYfA6UoIjK HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "id": 1
}