Texa DeskDevelopers

Texa Desk Application API · Contacts

Create Contact

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

Create a new Contact

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

inbox_idnumberrequired

ID of the inbox to which the contact belongs

namestring

name of the contact

emailstring

email of the contact

blockedboolean

whether the contact is blocked or not

phone_numberstring

phone number of the contact

avatarstring (binary)

Send the form data with the avatar image binary or use the avatar_url

avatar_urlstring

The url to a jpeg, png file for the contact avatar

identifierstring

A unique identifier for the contact in external system

additional_attributesobject

An object where you can store additional attributes for contact. example {"type":"customer", "age":30}

custom_attributesobject

An object where you can store custom attributes for contact. example {"type":"customer", "age":30}, this should have a valid custom attribute definition.

Responses

200

Success

payloadarray of object
payload[].additional_attributesobject

The object containing additional attributes related to the contact

payload[].availability_statusstring

The availability status of the contact

payload[].emailstring

The email address of the contact

payload[].idinteger

The ID of the contact

payload[].namestring

The name of the contact

payload[].phone_numberstring

The phone number of the contact

payload[].blockedboolean

Whether the contact is blocked

payload[].identifierstring

The identifier of the contact

payload[].thumbnailstring

The thumbnail of the contact

payload[].custom_attributesobject

The custom attributes of the contact

payload[].last_activity_atinteger

The last activity at of the contact

payload[].created_atinteger

The created at of the contact

payload[].contact_inboxesarray of object
payload[].contact_inboxes[].source_idstring

Contact Inbox Source Id

payload[].contact_inboxes[].inboxobject
idnumber

Id of the user

availability_statusstring

Availability status of the user One of: online, offline.

400

Bad Request Error

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