Overview
Getting Started
Widgets
Categories
Keywords
Reviews
Users
Businesses
Businesses Search
Negotiations
Messages
Requests
Help
Changelog
Terms and Policies
The User APIs support two different groups of behaviors: general purpose User operations and User Webhook related operations.
More technical details regarding general purpose User operations can be seen in the User API.
GET /api/v4/users/self HTTP/2authorization: Bearer {{authCode}}
{"userID": "1337","email": "hello@world.com","firstName": "Hello","lastName": "World"}
More technical details regarding User Webhook related operations can be seen in the User Webhook API. Below, we illustrate an example.
For the below examples, you can leverage https://webhook.site to test out the webhook behavior.
The below command creates a disabled webhook which listens for MessageCreated Events.
POST /api/v4/users/webhooks HTTP/2authorization: Bearer {{authCode}}content-type: application/json{"webhookURL": "<your webhook URL>","eventTypes": ["MessageCreated"],"enabled": false,"auth": {"username": "hello","password": "world"}}
{"webhookID": "<your unique webhookID>","webhookURL": "<your webhook URL>","enabled": false,"authType": "Basic","userID": "<your userID>","eventTypes": ["MessageCreated"]}
We can fetch this Webhook's data directly, as such:
GET /api/v4/users/webhooks/{{webhookID}} HTTP/2authorization: Bearer {{authCode}}
{"webhookID": "<your webhookID>","webhookURL": "<your webhook.site URL>","enabled": false,"authType": "Basic","userID": "<your userID>","eventTypes": ["MessageCreated"]}
Alternatively, we can fetch all Webhooks for the given User.
GET /api/v4/users/webhooks HTTP/2authorization: Bearer {{authCode}}
{"data": [{...webhook fields},...],"pagination": {"limit": 10}}
We can enable the webhook by:
PUT /api/v4/users/webhooks/{{webhookID}} HTTP/2authorization: Bearer {{authCode}}content-type: application/json{"enabled": true}
We can modify the Webhook's authentication by:
PUT /api/v4/users/webhooks/{{webhookID}}/auth HTTP/2authorization: Bearer {{authCode}}content-type: application/json{"username": "username","password": "password"}
We can delete the Webhook's authentication by:
DELETE /api/v4/users/webhooks/{{webhookID}}/auth HTTP/2authorization: Bearer {{authCode}}
DELETE /api/v4/users/webhooks/{{webhookID}} HTTP/2authorization: Bearer {{authCode}}