Contact is an entity that connects the user and the customer who has written. It is a kind of "contact card" where the client's contact information (phone number to contact in WhatsApp, id in Telegram, username in Instagram) is stored and the manager responsible for him is specified.
To add a contact list or change existing ones, send a request
https://api.wazzup24.com/v3/contactsPOST /v3/contacts
└── [array of objects]
├── id *
├── responsibleUserId *
├── name *
├── contactData * []
│ ├── chatType *
│ ├── chatId *
│ ├── username
│ └── phone
└── uri
There's a limit of 100 entities per request.
| Parameter Required parameters are marked with an asterisk | Type | Description |
| id* | String | Contact ID in the CRM system. No more than 100 characters |
| responsibleUserId* | String | The ID of the responsible user. No more than 100 characters. Fill in this field to have the dialog displayed in the Wazzup chat window of the person responsible for the contact |
| name* | String | Contact Name. No more than 200 characters |
| contactData* | Array of objects contactData | An array of objects with contact data |
| uri | String | A link to the contact in the CRM. Not more than 200 characters. If specified, in the "Deals" dropdown, the user will see a button leading to the contact's page in the CRM |
| Parameter Required parameters are marked with an asterisk | Type | Description |
| chatType* | String | Chat type. Available values:
|
| chatId* | String | Chat Id (contact's account in messenger):
|
| username | String | For Telegram only. The username of the Telegram contact, with no @ at the beginning. Can be used when sending messages via Telegram if chatId is not known |
| phone | String | For Telegram only. Contact's phone number in international format, without + and other symbols, only numbers, with the correct country code. Can be used when sending messages via Telegram if the chatId is not known |
fetch("https://api.wazzup24.com/v3/contacts", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer {apiKey}",
},
body: [
{
"id": "1",
"responsibleUserId": "1",
"name": "3301",
"contactData": [
{
"chatType": "whatsapp",
"chatId": "79991114433"
}
],
"uri": "https://link-to-contact-in-crm.com"
},
{
"id": "2",
"responsibleUserId": "1",
"name": "3302",
"contactData": [
{
"chatType": "whatsapp",
"chatId": "79884447788"
}
]
}
]
In addition to the common errors for all routes, in this one it is still possible:
| Error | Type | Description |
| INVALID_CONTACTS_DATA | String | The body of the request is empty or some of the passed fields are invalid. |
| TOO_MANY_ENTITIES | String | Limit of 100 entities per request exceeded |
INVALID_CONTACTS_DATA example
HTTP/1.1 400 Bad Request
{
"error": "INVALID_CONTACTS_DATA",
"description": "One or more of provided contacts data are not valid."
"data": [
{
index: 12,
fields: [
"responsibleUserId",
]
}
]
}
TOO_MANY_ENTITIES example
HTTP/1.1 400 Bad Request
{
"error": "TOO_MANY_ENTITIES",
"description": "Too many entities per request.",
"data": {
"count": 123,
"limit": 100,
}
}
To get the list of contacts call:
https://api.wazzup24.com/v3/contacts?offset=You can get up to 100 records in one query, including offset, sorted by ascending id (ASC). offset — pagination offset, non-negative integer.
The data from the query result will come in an array of objects with the following parameters:
Response
├── count
└── data[]
├── id
├── responsibleUserId
├── name
├── contactData[]
│ ├── chatType
│ └── chatId
└── uri
| Parameter | Type | Description |
| count | Number | Total number of contacts |
| data | Array of objects data | Array with data about the contact |
| Parameter | Type | Description |
| id | String | Contact Id in the CRM system. No more than 100 characters |
| responsibleUserId | String | Id of the responsible user. No more than 100 characters |
| name | String | Contact name. No more than 200 characters |
| contactData | Array of objects contactData | An array of objects with contact data that contains chatType and chatId |
| uri | String | A link to the contact in the CRM. Not more than 200 characters. If specified, in the "Deals" dropdown, the user can see a button leading to the contact's page in the CRM |
To get information about a single contact uploaded from CRM to Wazzup you need to call
https://api.wazzup24.com/v3/contacts/{contact id}curl --location --request GET 'https://api.wazzup24.com/v3/contacts/111-2e0df379-0e3c-470f-9b36' \ --header 'Authorization: Bearer c8cf904467023482f909520d454368d27'
The data from the query result will come in the form of an object with the following parameters:
| Parameter | Type | Description |
| id | String | Contact Id in the CRM system. No more than 100 characters |
| responsibleUserId | String | Id of the responsible user. No more than 100 characters |
| name | String | Contact name. No more than 200 characters |
| contactData | Array of objects contactData | An array of objects with contact data that contains chatType and chatId |
| uri | String | A link to the contact in the CRM. Not more than 200 characters. If specified, in the "Deals" dropdown, the user will see a button leading to the contact's page in the CRM |
To delete a contact, call:
https://api.wazzup24.com/v3/contacts/{contact id}If there is a dialog with this contact in the general chat, it will remain there.
curl --location --request DELETE 'https://api.wazzup24.com/v3/contacts/111-2e0df379-0e3c-470f-9b36' \ --header 'Authorization: Basic c8cf90444023482f909520d454368d27'
To delete the list of contacts, call
https://api.wazzup24.com/v3/contacts/bulk_deleteIn the body of the request you must pass an array of id of contacts to be deleted. If the deletion is successful, 200 OK and an empty array will be returned. If you specified contacts in the deletion request, some of which are absent in Wazzup, their IDs will be returned as an array in the response.
fetch("https://api.wazzup24.com/v3/contacts/bulk_delete", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer {apiKey}",
},
body: [
"contact-id-123",
"contact-id-456",
]
});