Arrow
Get started with Wazzup
Arrow
How to connect a messenger
Arrow
How to use Wazzup chats
Arrow
How to pay for the service
Arrow
Bitrix24
Arrow
Kommo
Arrow
Zoho CRM
Arrow
HubSpot
Arrow
Pipedrive
Arrow
Other CRMs
Arrow
How to sell even easier
Arrow
All about WABA
Arrow
For partners
Arrow
Public API
Arrow

Working with contacts

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.

Adding and updating the contact list

To add a contact list or change existing ones, send a request

POST https://api.wazzup24.com/v3/contacts
POST /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

contactData (object)

Parameter Required parameters are marked with an asterisk Type Description
chatType* String Chat type. Available values:
  • WhatsApp: "whatsapp",
  • WhatsApp group chat: "whatsgroup",
  • Viber: "viber",
  • Instagram: "instagram",
  • Telegram: "telegram".
chatId* String Chat Id (contact's account in messenger):
  • for "whatsapp" and "viber" — only numbers, without spaces and special characters in the format 79011112233,
  • for "instagram" — an account without "@" in the beginning,
  • for "whatsgroup" — comes in webhooks of incoming messages,
  • for "telegram" — comes in webhooks of incoming messages and in response to a request when sending an outgoing one with phone or username parameters.
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

Request example

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"
            }
        ]
    }
]

Errors

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,
}
}

Obtaining the contact list

To get the list of contacts call:

GET 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.

Response

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

data (object)

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

Getting information about an individual contact

To get information about a single contact uploaded from CRM to Wazzup you need to call

GET https://api.wazzup24.com/v3/contacts/{contact id}

Request example

 curl --location --request GET 'https://api.wazzup24.com/v3/contacts/111-2e0df379-0e3c-470f-9b36' \
--header 'Authorization: Bearer c8cf904467023482f909520d454368d27'

Response

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

Deleting a contact

To delete a contact, call:

DELETE https://api.wazzup24.com/v3/contacts/{contact id}

If there is a dialog with this contact in the general chat, it will remain there.

Request example

 curl --location --request DELETE 'https://api.wazzup24.com/v3/contacts/111-2e0df379-0e3c-470f-9b36' \
--header 'Authorization: Basic c8cf90444023482f909520d454368d27'

Errors

Deleting multiple contacts

To delete the list of contacts, call

PATCH https://api.wazzup24.com/v3/contacts/bulk_delete

In 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.

Request example

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",
  ]
});