Register a webhook
POST/api/v2/webhooks
Registers a URL that we call every time the event happens for your firm. The webhook also appears in API Settings in your dashboard, where it can be edited or removed too.
Your firm can have one webhook per event. To point an existing webhook somewhere else, update its URL instead of registering a second one.
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Required | The full address we should call, starting with https:// or http://. It must be reachable from the public internet and accept a POST request. |
eventType | string | Required | The event to subscribe to. NEW_REVIEW, or NEW_ENQUIRY_CLIENT_ASSIST if your firm has Client Assist. See Events and payloads. |
Request
cURL
POST /api/v2/webhooks
curl --location 'https://www.reviewsolicitors.co.uk/api/v2/webhooks' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com/reviewsolicitors",
"eventType": "NEW_REVIEW"
}'Response
200 OK
{
"id": 399,
"url": "https://example.com/reviewsolicitors",
"eventType": "NEW_REVIEW",
"status": "ACTIVE"
}Keep the id: you need it to update or delete the
webhook. Deliveries start from the next event. See
the webhook object.
Errors
| Code | Cause |
|---|---|
| 400 | url is missing or is not a full URL, or eventType is missing. Returns a list of field errors. |
| 400 | eventType is not a known event (or is NEW_ENQUIRY_CLIENT_ASSIST and your firm does not have Client Assist), or this url is already registered for that event. |
A missing or malformed field returns a list of field errors:
400 Bad Request
[
{
"field": "url",
"error": ["Enter a full URL starting with https://"]
}
]Last updated on