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 the user entity

Users are the profiles you create in CRM for your employees. These are not your customers, but your managers or support staff. The set of methods below will help you set up the synchronization of user accounts in your CRM with Wazzup.

Getting a list of users

To get a list of active Wazzup users, you need to call:

GET https://api.wazzup24.com/v3/users

This method returns users sorted by name.

Request example

curl --location --request GET 'https://api.wazzup24.com/v3/users' \
--header 'Authorization: Bearer c8cf90444442348we909520d454368d27'

Response example

[
    {
        "id": "2e0df379-0e3c-470f-9b36-06b9e34c3bdb", // user id
        "name": "User Name" // user name
    } 
]

Retrieving single user data

To retrieve data on a specific user, you need to call

GET https://api.wazzup24.com/v3/users/:id

The response will be a JSON like this

  {
    "id": "2e0df379-0e3c-470f-9b36-06b9e34c3bdb", // user id
    "name": "User Name", // user name
    "phone": "79332345432" // user phone
  }

Adding users

To add a new user you need to call

POST https://api.wazzup24.com/v3/users
POST /v3/users
└── [array of objects]
    ├── id *
    ├── name *
    └── phone

In the request body, you should pass an array with data about users (not more than 100 in one request). Users are compared by their id: if the user does not yet exist in Wazzup, he will be added, if he exists, his data will be updated.

Adding users with the same phone number via the API is limited. If there is an error, you will receive a notification.
Parameter Type Description
[array of objects] Array of objects user An array containing information about users to be added or updated

user (object)

Parameter Type Description
id* String User identifier. Up to 200 characters
name* String User name. A string of up to 200 characters
phone String The phone number is in the international format "79261234567". If you specify the phone in the wrong format, there will be no error, the property phone will simply be deleted

The "phone" field is specified only for the ability to add a user to the mobile application.

Request example

curl --location --request POST 'https://api.wazzup24.com/v3/users' \
--header 'Authorization: Bearer c8cf90444023482f909520d454368d27' \
--header 'Content-Type: application/json' \
--data-raw '[
  {
    "id": "2e0df379-0e3c-470f-9b36-06b9e34c3bdb",
    "name": "Alex Salesman",
    "phone": "79263334567"
  },
  {
    "id": "111-2e0df379-0e3c-470f-9b36",
    "name": "Kate Supportics",
    "phone": "79261234567"
  }
]'

Error

Error Type Description
INVALID_USERS_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 is exceeded
USER_LIMIT_EXCEEDED String The limit of 1,000 users is exceeded: you cannot add more employees to your personal account
DUPLICATE_PHONE_NUMBER String A user with this phone number has already been added.«User with phone number .... already exists in the CRM.»
Internal server error Number One of the reasons for error 500 is multiple identical user ids in the request
HTTP/1.1 400 Bad Request
{
  "error": "INVALID_USERS_DATA",
  "description": "One or more of provided users identifiers are not valid."
  "data": [
    {
      index: 12,
      fields: [
        "id",
        "name"
      ]
    }
  ]
}
HTTP/1.1 400 Bad Request
{
  "error": "TOO_MANY_ENTITIES",
  "description": "Too many entities per request.",
  "data": {
    "count": 123,
    "limit": 100
  }
}
HTTP/1.1 400 Bad Request
{
  "error": "USER_LIMIT_EXCEEDED",
  "description": "User limit exceeded.",
  "data": {
    "limit": 1000,
  }
}
{
    "status": 400,
    "requestId": "594101c6e81a1cace2646eee1edd5e66",
    "error": "DUPLICATE_PHONE_NUMBER",
    "description": "User with phone number 79999999999 already exists in the CRM.",
    "data": {
        "phone": "79999999999"
    }
}

Deleting a user

To delete a user, you need to call

DELETE https://api.wazzup24.com/v3/users/{contact id}
Request example
curl --location --request DELETE 'https://api.wazzup24.com/v3/users/111-2e0df379-0e3c-470f-9b36' \
--header 'Authorization: Bearer c8cf90444023482f909520d454368d27'

Mass user removal

To delete the list of users, it is necessary to call

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

In the body of the request you must pass an array of IDs of users you want to remove. If the deletion is successful, 200 OK and an empty array will be returned. If the deletion request specified users, some of which are absent in Wazzup, their IDs will be returned as an array in the response.