API reference
Webhook endpoints
A webhook endpoint is a URL of yours that receives Okaymate's events as they happen. A business can have 10. Read Webhooks for the events, their payloads and how to verify a signature.
The webhook endpoint object
A URL of yours that Okaymate sends events to. See Webhooks for the events and how to verify them.
Attributes
- idstringUnique identifier for the endpoint.
- objectstringAlways
webhook_endpoint. - urlstringThe HTTPS URL events are sent to.
- descriptionstring or nullYour note about the endpoint.
- eventsarray of stringsThe event types sent to it.
lead.createdmessage.receivedmessage.sent - statusstringWhether events are sent to it.
enableddisabled - created_atstringWhen the endpoint was created, ISO 8601.
- last_deliveryobject or nullThe last event sent to it,
nullbefore the first. - secretstringThe signing secret,
whsec_and 32 characters. Only in the response of create, shown once.
{
"id": "wh3LpX9dKe",
"object": "webhook_endpoint",
"url": "https://example.com/webhooks/okaymate",
"description": "Helpdesk sync",
"events": ["lead.created", "message.received"],
"status": "enabled",
"created_at": "2026-11-02T10:14:22.000Z",
"last_delivery": {
"status": "succeeded",
"at": "2026-11-24T09:12:44.000Z",
"status_code": 200
}
}List webhook endpoints
Returns the business's webhook endpoints, the newest first, without their secrets.
Returns
A list of webhook endpoint objects. has_more is always false.
curl https://okaymate.ai/api/v1/webhook_endpoints \
-H "Authorization: Bearer $OKAYMATE_API_KEY"{
"object": "list",
"data": [
{
"id": "wh3LpX9dKe",
"object": "webhook_endpoint",
"url": "https://example.com/webhooks/okaymate",
"description": "Helpdesk sync",
"events": ["lead.created", "message.received"],
"status": "enabled",
"created_at": "2026-11-02T10:14:22.000Z",
"last_delivery": {
"status": "succeeded",
"at": "2026-11-24T09:12:44.000Z",
"status_code": 200
}
}
],
"has_more": false,
"next_cursor": null
}Create a webhook endpoint
Registers a URL for one or more event types. Store the secret of the response, it is the only time you see it.
Body parameters
- urlstringRequiredAn HTTPS URL on a public address.
- eventsarray of stringsRequiredThe event types to send.
lead.createdmessage.receivedmessage.sent - descriptionstringA note for yourself.
Returns
The new webhook endpoint object with its secret.
Errors
- A required parameter is missing.
paramnames it. - A parameter has a value the API does not accept, like a URL that is not HTTPS or points to a private address, or the business already has 10 endpoints.
paramnames it.
curl -X POST https://okaymate.ai/api/v1/webhook_endpoints \
-H "Authorization: Bearer $OKAYMATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/okaymate",
"events": ["lead.created", "message.received"],
"description": "Helpdesk sync"
}'{
"id": "wh3LpX9dKe",
"object": "webhook_endpoint",
"url": "https://example.com/webhooks/okaymate",
"description": "Helpdesk sync",
"events": ["lead.created", "message.received"],
"status": "enabled",
"created_at": "2026-11-24T09:20:03.000Z",
"last_delivery": null,
"secret": "whsec_4QeX7nP2kR9tLm3Vb8YzC1dF6hJ0sWuA"
}Retrieve a webhook endpoint
Returns one webhook endpoint, without its secret.
Path parameters
- idstringRequiredThe webhook endpoint's ID.
Returns
Errors
- No webhook endpoint with this ID on the business.
curl https://okaymate.ai/api/v1/webhook_endpoints/wh3LpX9dKe \
-H "Authorization: Bearer $OKAYMATE_API_KEY"{
"id": "wh3LpX9dKe",
"object": "webhook_endpoint",
"url": "https://example.com/webhooks/okaymate",
"description": "Helpdesk sync",
"events": ["lead.created", "message.received"],
"status": "enabled",
"created_at": "2026-11-02T10:14:22.000Z",
"last_delivery": {
"status": "succeeded",
"at": "2026-11-24T09:12:44.000Z",
"status_code": 200
}
}Update a webhook endpoint
Changes an endpoint. Only the fields you send change. A disabled endpoint gets no events.
Path parameters
- idstringRequiredThe webhook endpoint's ID.
Body parameters
- urlstringA new HTTPS URL.
- eventsarray of stringsThe event types to send.
lead.createdmessage.receivedmessage.sent - descriptionstringA note for yourself.
- statusstringTurn the endpoint on or off.
enableddisabled
Returns
The updated webhook endpoint object.
Errors
- No webhook endpoint with this ID on the business.
- A parameter has a value the API does not accept.
paramnames it.
curl -X PATCH \
https://okaymate.ai/api/v1/webhook_endpoints/wh3LpX9dKe \
-H "Authorization: Bearer $OKAYMATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "disabled"
}'{
"id": "wh3LpX9dKe",
"object": "webhook_endpoint",
"url": "https://example.com/webhooks/okaymate",
"description": "Helpdesk sync",
"events": ["lead.created", "message.received"],
"status": "disabled",
"created_at": "2026-11-02T10:14:22.000Z",
"last_delivery": {
"status": "succeeded",
"at": "2026-11-24T09:12:44.000Z",
"status_code": 200
}
}Delete a webhook endpoint
Deletes an endpoint. It gets no more events.
Path parameters
- idstringRequiredThe webhook endpoint's ID.
Returns
An object with the endpoint's id and deleted set to true.
Errors
- No webhook endpoint with this ID on the business.
curl -X DELETE \
https://okaymate.ai/api/v1/webhook_endpoints/wh3LpX9dKe \
-H "Authorization: Bearer $OKAYMATE_API_KEY"{
"id": "wh3LpX9dKe",
"object": "webhook_endpoint",
"deleted": true
}Send a test event
Sends a sample message.received event to the endpoint now, with test set to true. One attempt, no retry.
Path parameters
- idstringRequiredThe webhook endpoint's ID.
Returns
An object with the delivery's status, succeeded or failed, and the status_code your endpoint answered.
Errors
- No webhook endpoint with this ID on the business.
curl -X POST \
https://okaymate.ai/api/v1/webhook_endpoints/wh3LpX9dKe/test \
-H "Authorization: Bearer $OKAYMATE_API_KEY"{
"status": "succeeded",
"status_code": 200
}