Contacts API

Allows you to add, edit and retrieve contact information via API.

API calls are made per channel. Tokens can be generated by using the key icon, next to the desired channel in Settings. There is a 200 API calls per minute rate limit.

Requests

The Contacts API is composed of several requests:

  • Get Contact by Custom Field

  • Get Contact by ID

  • Update Contact by ID

  • Add Tag by ID

  • Remove Tag by ID

  • Create Contact

Get Contact by Custom Field

This request returns a list of Contact objects with pagination.

/v1/contact/by_custom_field

Sample GET Request

circle-info

If you wish to retrieve a list of contacts by custom field of type boolean, please be sure to use true or false as a value.

If you wish to retrieve a list of contacts by phone number, please be sure to replace the '+' with '%2B'

Response - Success (HTTP status → 200)

Get Contact by ID

This request returns a single Contact object.

Sample GET Request

Response - Success (HTTP status → 200)

Update Contact by ID

This request updates a contact custom field value.

Contact field (IDs) that are allowed to be updated

  • firstName

  • lastName

  • profilePic

  • language

  • phone

  • email

  • custom_field IDs (Refer Contact Field module to get the ID of each custom field)

Custom field is allowed to be updated

Sample PUT Request

Response - Success (HTTP status → 200)

Limitations

Maximum 30 Fields updated per Request.

circle-info

Please note that in case of Viber Channel - due to a certain limitation - the Contact ID needs to be provided in a Base64 encoded format.

Add Tag by ID

This request adds tags for a Contact.

Sample POST Request

Response - Success (HTTP status → 200)

Limitations

Maximum 10 Tags added per Request.

Remove Tag by ID

This request deletes tags for a Contact.

Sample DELETE Request

Response - Success (HTTP status → 200)

Limitations

Maximum 10 Tags deleted per Request.

circle-info

Please note that in case of Viber Channel - due to a certain limitation - the Contact ID needs to be provided in a Base64 encoded format.

Create Contact

This request creates a Contact and sets values for its Custom Fields.

Sample POST Request

Response - Success (HTTP status → 200)

Error Codes

Unauthorized (HTTP Status → 401)

Too Many Requests (HTTP Status → 429)

Method Not Allowed (HTTP Status → 405)

General (HTTP Status → 403)

Limitations

Maximum 30 Fields created per Request.

Last updated