Texa DeskDevelopers

Texa Desk Application API · Custom attributes

Add a new custom attribute

POST/api/v1/accounts/{account_id}/custom_attribute_definitions

Add a new custom attribute to account

Authorization

api_access_tokenheaderrequired

A person's access token (Texa Desk, Profile settings → Access token) or an agent bot's token, in the api_access_token header. It acts as that person, with their role's permissions.

Path parameters

account_idintegerrequired

The numeric ID of the account

Body application/json

attribute_display_namestring

Attribute display name

attribute_display_typeinteger

Attribute display type (text- 0, number- 1, currency- 2, percent- 3, link- 4, date- 5, list- 6, checkbox- 7)

attribute_descriptionstring

Attribute description

attribute_keystring

Attribute unique key value

attribute_valuesarray of string

Attribute values

attribute_modelinteger

Attribute type(conversation_attribute- 0, contact_attribute- 1)

regex_patternstring

Regex pattern (Only applicable for type- text). The regex pattern is used to validate the attribute value(s).

regex_cuestring

Regex cue message (Only applicable for type- text). The cue message is shown when the regex pattern is not matched.

Responses

200

Success

idinteger

Identifier

attribute_display_namestring

Attribute display name

attribute_display_typestring

Attribute display type (text, number, currency, percent, link, date, list, checkbox)

attribute_descriptionstring

Attribute description

attribute_keystring

Attribute unique key value

regex_patternstring

Regex pattern

regex_cuestring

Regex cue

attribute_valuesstring

Attribute values

attribute_modelstring

Attribute type(conversation_attribute/contact_attribute)

default_valuestring

Attribute default value

created_atstring

The date and time when the custom attribute was created

updated_atstring

The date and time when the custom attribute was updated

403

Access denied

descriptionstring
errorsarray of object
errors[].fieldstring
errors[].messagestring
errors[].codestring