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

  • idstring
    Unique identifier for the endpoint.
  • objectstring
    Always webhook_endpoint.
  • urlstring
    The HTTPS URL events are sent to.
  • descriptionstring or null
    Your note about the endpoint.
  • eventsarray of strings
    The event types sent to it.
    lead.createdmessage.receivedmessage.sent
  • statusstring
    Whether events are sent to it.
    enableddisabled
  • created_atstring
    When the endpoint was created, ISO 8601.
  • last_deliveryobject or null
    The last event sent to it, null before the first.
  • secretstring
    The signing secret, whsec_ and 32 characters. Only in the response of create, shown once.
Webhook endpoint object
{
  "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

GET/v1/webhook_endpointsRead access

Returns the business's webhook endpoints, the newest first, without their secrets.

Returns

A list of webhook endpoint objects. has_more is always false.

GET/v1/webhook_endpoints
curl https://okaymate.ai/api/v1/webhook_endpoints \
  -H "Authorization: Bearer $OKAYMATE_API_KEY"
Response200
{
  "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

POST/v1/webhook_endpointsRead and write access

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

  • urlstringRequired
    An HTTPS URL on a public address.
  • eventsarray of stringsRequired
    The event types to send.
    lead.createdmessage.receivedmessage.sent
  • descriptionstring
    A note for yourself.

Returns

The new webhook endpoint object with its secret.

Errors

  • A required parameter is missing. param names 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. param names it.
POST/v1/webhook_endpoints
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"
  }'
Response201
{
  "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

GET/v1/webhook_endpoints/:idRead access

Returns one webhook endpoint, without its secret.

Path parameters

  • idstringRequired
    The webhook endpoint's ID.

Returns

A webhook endpoint object.

Errors

GET/v1/webhook_endpoints/:id
curl https://okaymate.ai/api/v1/webhook_endpoints/wh3LpX9dKe \
  -H "Authorization: Bearer $OKAYMATE_API_KEY"
Response200
{
  "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

PATCH/v1/webhook_endpoints/:idRead and write access

Changes an endpoint. Only the fields you send change. A disabled endpoint gets no events.

Path parameters

  • idstringRequired
    The webhook endpoint's ID.

Body parameters

  • urlstring
    A new HTTPS URL.
  • eventsarray of strings
    The event types to send.
    lead.createdmessage.receivedmessage.sent
  • descriptionstring
    A note for yourself.
  • statusstring
    Turn the endpoint on or off.
    enableddisabled

Returns

The updated webhook endpoint object.

Errors

PATCH/v1/webhook_endpoints/:id
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"
  }'
Response200
{
  "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

DELETE/v1/webhook_endpoints/:idRead and write access

Deletes an endpoint. It gets no more events.

Path parameters

  • idstringRequired
    The webhook endpoint's ID.

Returns

An object with the endpoint's id and deleted set to true.

Errors

DELETE/v1/webhook_endpoints/:id
curl -X DELETE \
  https://okaymate.ai/api/v1/webhook_endpoints/wh3LpX9dKe \
  -H "Authorization: Bearer $OKAYMATE_API_KEY"
Response200
{
  "id": "wh3LpX9dKe",
  "object": "webhook_endpoint",
  "deleted": true
}

Send a test event

POST/v1/webhook_endpoints/:id/testRead and write access

Sends a sample message.received event to the endpoint now, with test set to true. One attempt, no retry.

Path parameters

  • idstringRequired
    The webhook endpoint's ID.

Returns

An object with the delivery's status, succeeded or failed, and the status_code your endpoint answered.

Errors

POST/v1/webhook_endpoints/:id/test
curl -X POST \
  https://okaymate.ai/api/v1/webhook_endpoints/wh3LpX9dKe/test \
  -H "Authorization: Bearer $OKAYMATE_API_KEY"
Response200
{
  "status": "succeeded",
  "status_code": 200
}