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"} , "phone": "79332345432 //user name ] }
Adding users
To add a new user you need to call
POST https://api.wazzup24.com/v3/users
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.
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 | Description |
INVALID_USERS_DATA | The body of the request is empty or some of the passed fields are invalid. |
TOO_MACH_ENTITIES | Limit of 100 entities per request is exceeded |
USER_LIMIT_EXCEEDED | The limit of 1,000 users is exceeded: you cannot add more employees to your personal account |
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.