Create Audience Attribute
The Create Audience Attribute API adds the audience attributes that needs to be associated with an audience.
URL
The HTTP URL for Create Audience Attribute API is:
http://<host>:<port>/api/v1/admin/attributes
Method
POST
Header
The payload's request header includes Content-Type as application/json
Input Parameters
The following fields are the input parameters:
Sample Request
{
"attributeName" : "PhoneNumber",
"attributeType" : "Number",
"allowedValues" : "",
"attributeRequired" : false,
"allowedReconciliationKey" : false
}
NOTE: The following permissions are required to create a user attribute:
ROLE_CONFIGURATIONS
ROLE_CREATE_ATTRIBUTES
Output Parameters
The following fields are output parameters:
| Output Parameter | Type | Description |
|---|---|---|
| id | long | A unique ID assigned to an audience attribute |
| message | string | Response status message |
Sample Response
{
"id" : "3",
"message" : "Details added successfully"
}
Response Status
| Code | Description |
|---|---|
| Status 200 | Details added successfully |
| Status 400 | Invalid Request. Request Method not allowed Attribute already exists with this name Invalid Attribute Type. Allowed values are : String, Number, Pick List, Date |
| Status 401 | Unauthorized request |
| Status 500 | Server failure to process request |