> Every page of the Heythere docs is listed in https://heythere.io/docs/llms.txt: fetch it to find a page instead of guessing its URL.

# Webhook destinations: get Heythere events in your tools

> Have Heythere post to your CRM, helpdesk or Slack relay when a contact waits for a member, a run fails or WhatsApp refuses a message.

Camille asks her repair shop whether they can also fix her gears, and the shop's automation hands her over to the team. The shop's helpdesk opens a ticket for her at once, because Heythere posted the handover to it. A webhook destination is an https address of your own system that Heythere posts the workspace's events to, each type you choose, so your tools learn what happens on WhatsApp without asking.

An agent creates one with `saveWebhookDestination`, naming it, such as `helpdesk`, and listing the event types it receives.

## Which events can a destination receive?

| Event type                                       | When Heythere posts it                                                                                                  |
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| `live_chat.handed_over`                          | An automation hands a contact over to the members, which starts a [live chat](https://heythere.io/docs/concepts/live-chats).               |
| `live_chat.message_received`                     | A contact writes during a live chat.                                                                                    |
| `automation_run.failed`                          | A [run](https://heythere.io/docs/concepts/runs) of a published automation fails, with the step it stopped at and why.                      |
| `message.failed`                                 | WhatsApp refuses or cannot deliver a message the workspace sent.                                                        |
| `webhook_source.request_refused`                 | A [webhook source](https://heythere.io/docs/concepts/webhook-sources) starts refusing requests, or refuses them for another reason.        |
| `whatsapp_phone_number.quality_changed`          | Meta rates a number's [quality](https://heythere.io/docs/concepts/whatsapp-connection#how-does-meta-rate-a-number-s-quality-) differently. |
| `whatsapp_message_template.review_state_changed` | Meta approves, rejects, pauses or disables a [template](https://heythere.io/docs/concepts/message-templates).                              |

Each event carries what it concerns in the shape the API returns it, such as the run as `getAutomationRun` reads it, so the helpdesk writes Camille's ticket without another request. A test played in Heythere Playground posts none.

## How does my system know a request comes from Heythere?

Heythere signs every request as the Standard Webhooks specification describes, with the `webhook-id`, `webhook-timestamp` and `webhook-signature` headers, so any Standard Webhooks library verifies it. Saving a destination returns its `signingSecret`, the same each time it is saved again.

Your system answers with a 2xx once it took the event. Heythere tries again otherwise, with the same `webhook-id`, so a system that handles each id once never opens Camille's ticket twice.

## Where to look when an event never arrives?

`sendWebhookDestinationTestEvent` posts a `webhook_destination.tested` event to the destination, whatever types it lists, to check that your system receives and verifies it. `listWebhookDestinationDeliveries` lists the events Heythere sent it in the last 30 days, with the exact body and what your system answered to each attempt, such as a 500, or `address_refused` when the address is not on the public internet.

A destination that accepted no request for 3 days is disabled: Heythere sends it nothing, test events included, until a member saves it again.

## In the API

Every operation is a REST endpoint and, unless marked REST only, an MCP tool of the same name. [The OpenAPI document](https://app.heythere.io/api/openapi.json) describes their parameters, payloads, and errors.


- `saveWebhookDestination`: Save a webhook destination. `PUT /api/organizations/{organizationId}/workspaces/{workspaceId}/webhook-destinations/{name}`
- `listWorkspaceWebhookDestinations`: List webhook destinations. `GET /api/organizations/{organizationId}/workspaces/{workspaceId}/webhook-destinations`
- `sendWebhookDestinationTestEvent`: Send a test event to a webhook destination. `POST /api/organizations/{organizationId}/workspaces/{workspaceId}/webhook-destinations/{name}/test-events`
- `listWebhookDestinationDeliveries`: List the deliveries of a webhook destination. `GET /api/organizations/{organizationId}/workspaces/{workspaceId}/webhook-destinations/{name}/deliveries`
- `deleteWebhookDestination`: Delete a webhook destination. `DELETE /api/organizations/{organizationId}/workspaces/{workspaceId}/webhook-destinations/{name}`
