Audiences

An audience is a group of contacts that can be targeted in the same campaign. The audiences and the contacts of the audiences are managed by the user through Audience API.

Audience endpoints are meant to control the audiences of the accounts.

Method: Update

-no description-

URL /v1/audiences/{audience_id}
Method Type PUT
Authorization API Key
Request Content-Type JSON
Response Content-Type JSON

Headers

Name Type Description Status
X-Dexatel-Key string API key Required

Request Body

Name Type Description Status
data object

Details

(see data object below)
Optional
data object
Name Type Description Status
name string Name (unique identifier) of the audience Required
contacts array

Details

(see contacts object below)
Optional
contacts object
Name Type Description Status
number string Phone number of the contact Optional
first_name string First name of the contact Optional
last_name string Last name of the contact Optional
timestamp string Timestamp value Optional
date string Date value to customize massages per contact Optional
tags array List of tags to differentiate and filter the users Optional

Response Parameters

Name Type Description Status
data object

Details

(see data object below)
Optional
data object
Name Type Description Status
id string Unique identifier of the audience Optional
account_id string Unique identifier of the account Optional
name string Name (unique identifier) of the audience Optional
channel string Channel to which contacts belong. Possible values: SMS, VIBER, WHATSAPP Optional
contacts_count integer Number of contacts Optional
create_date string Creation date of the audience in UTC, formatted as yyyyMM-dd HH:mm:ss Optional
update_date string Update date of the audience in UTC, formatted as yyyyMM-dd HH:mm:ss Optional
links object

Details

(see links object below)
Optional
links object
Name Type Description Status
self string URL of the audience Optional
account string URL of the account Optional
contacts string URL of the contacts Optional

Example of request body

PUT: /v1/audiences/22089fd7-7b74-4815-8452-3a8e864affbc
X-Dexatel-Key: 94d2f2f2884848bca861264ad86d8ace
Content-Type: application/json

                
                        

Example of response body

status - 200

                
                        

Error Codes

The following error codes are returned in response to a user’s request which contains bad syntax or cannot be fulfilled.

Code Description
1301 Audience is not found
1302 Invalid audience identifier
1303 'data.audience' name is required
1304 'data.name' is invalid
1305 'data.name' is too long
1306 'data.channel' is missing
1307 'data.channel' should be in: [SMS, WHATSAPP, VIBER]
1308 'data.contacts' must be at most [10] items in length
1309 Audience already exists