Skip to main content
With a webhook in hellomateo, you can trigger an HTTP callback to a configured URL when a specific event occurs within your hellomateo account. The callback payload contains data related to the event, which can be used to build custom integrations, notifications, and automated workflows. A webhook’s api_version decides which events it can subscribe to and what its payloads look like:
  • Webhooks have a dated api_version, such as 2026-11-12, and subscribe to a list of events such as contact.updated or message.read. Their payloads are the public API models in that version, with the includes you choose. See the webhook events reference for every event, its payload, includes, filters and versioning.
  • Legacy webhooks have the legacy API version and subscribe to one event from the list below. They are deprecated: they receive no new events, and the Web App no longer creates them. Existing legacy webhooks keep working, and the API still accepts event without api_version for clients that create them. See Upgrading a legacy webhook to move one to a dated version.
Both kinds share everything else on this page: signatures, retries, automatic disabling, the delivery log, resending, test events and authentication. The legacy events are:
  • contact.created: A new contact has been created.
  • contact_details.updated: The contact details have been updated.
  • contact.deleted: A contact has been deleted.
  • conversation.inbound: An inbound message has been received.
  • conversation.outbound: A message has been sent.
  • conversation.submission_error: We are unable to submit the message to the API of the provider.
  • conversation.sending_error: The provider is unable to send the message to the recipient.
  • conversation.tag: A conversation has been tagged.
  • conversation.untag: A tag has been removed from a conversation.
  • conversation.assign: A conversation has been assigned to a user.
  • conversation.unassign: A conversation has been unassigned from a user.
  • conversation.reopen: A conversation has been reopened.
  • conversation.close: A conversation has been closed.
  • form_submission.completed: A form submission has been completed.
  • form_submission.aborted: A form submission has been aborted.
For more information about the events you can trigger a webhook with in Hellomateo, including example payloads, see the legacy webhook event reference documentation.

Common webhook use cases

There are various scenarios where webhooks can be useful, some of them include:
  • Building custom chatbots or other workflows
  • Syncing data back into your ERP or CRM system

Setting up a webhook in hellomateo

Webhooks can be configured in our Web App and via the hellomateo API. See the Webhook API reference for how to create, list, update, and delete webhooks via the API. To create a webhook in the hellomateo Web App:
  • Go to Settings > “Integrations” > “Webhooks”.
  • Click “Add Webhook”.
  • Enter a name and the URL to send events to. The URL must:
    • Use HTTPS. You can use sites like https://webhook.site or tools like ngrok to create a HTTPS URL to test webhooks locally.
    • Be reachable from the internet: deliveries to local or private addresses are blocked.
    • Be able to handle incoming HTTP callbacks.
  • Under “Events”, pick the events the webhook receives, grouped by model. See the webhook events reference for every event and its payload.
  • Optionally, under “Include related records”, choose the includes of each model, and for *.updated events, the fields whose change sends the event (filters).
  • Choose how deliveries authenticate with your server: no authentication, HTTP headers such as an Authorization header, basic authentication, or OAuth2 client credentials. This is optional, but highly recommended. See Authenticating deliveries.
  • Click “Save”. The Web App creates a webhook in the latest API version and shows its signing secret once: copy it into your receiver to verify signatures. You can reveal it again later on the webhook’s page.
The webhook’s page shows its URL and whether it is enabled, with three tabs: “Deliveries”, the delivery log; “Events”, its version, events, includes and filters, which you can change; and “Settings”, its name, URL, authentication and signing secret. The menu next to the title sends a test event, enables or disables the webhook, and deletes it. Legacy webhooks are marked “Legacy”; their name, URL and method can still be edited.

Delivery log

The “Deliveries” tab of the webhook’s page lists every delivery of the last seven days: when the event happened, its type, the status (pending until the first attempt, then retrying, delivered or failed), the number of attempts and the last response code. Filter it by status, event and response code. Select a delivery to see the request body and every attempt with its response status, headers and body, its error and how long it took, and to resend it. The same log is available at GET /internal/webhooks/{webhook_id}/deliveries to the Web App only; it is not part of the public API.

Authenticating deliveries

Besides the signature, which every delivery carries, a webhook can authenticate with your server in one of these ways. Set it with credentials when you create the webhook or with PUT /v1/webhooks/{id}/credentials afterwards, or with “Change” under “Authentication” in the “Settings” tab of the webhook’s page in the Web App:
  • none: no credentials.
  • headers: static HTTP headers, such as an API key, sent with every delivery.
  • basic: HTTP Basic authentication with a username and password.
  • oauth2_client_credentials: an OAuth2 access token from your authorization server, sent as Authorization: Bearer <token>.
Credentials are write-only: they are stored encrypted, and no endpoint returns them. A webhook returns only its authentication_type. API versions before 2026-11-12 also return headers, which is always an empty object. PUT /v1/webhooks/{id}/credentials replaces the credentials as a whole, so send all fields again to change one of them, such as a rotated password.

OAuth2 client credentials

  • token_url: the token endpoint. It must use HTTPS and be reachable from the internet.
  • client_id and client_secret: the client hellomateo authenticates as.
  • scope and audience: optional; sent with the token request when set.
  • client_authentication: how the token request authenticates the client. client_secret_basic, the default, sends the client ID and secret as HTTP Basic credentials; client_secret_post sends them as client_id and client_secret in the form body.
Hellomateo requests a token with the client_credentials grant: a form-encoded POST to token_url with grant_type=client_credentials. The token endpoint must answer within 10 seconds, without a redirect, with a JSON body containing access_token and, optionally, token_type (Bearer) and expires_in.
  • Tokens are cached per webhook until 60 seconds before expires_in (half of expires_in for tokens valid for two minutes or less), or for five minutes when the response has no expires_in. Changing any OAuth2 field uses a new token.
  • When your server answers a delivery with 401, hellomateo drops the cached token, requests a new one and sends the delivery once more within the same attempt.
  • Creating a webhook with OAuth2 credentials, or changing them, requests a token first. When the token endpoint does not issue one, the change is rejected with a 400 error and the code WEBHOOK_AUTHENTICATION_FAILED.
  • When the token endpoint fails during a delivery, with a status code other than 2xx (including invalid_client), a response without an access token, a timeout or a connection error, the attempt fails and is retried like any other failed attempt. The delivery log shows authentication failed: token endpoint returned <status>, or the connection error; it never shows the token endpoint’s response.
  • The access token, the token response and the client secret are never logged or stored in the delivery log.
Deliveries authenticated with OAuth2 are still signed, so you can verify them as described below.

Handling deliveries

There are a few things to remember when receiving a webhook from hellomateo:
  • You must receive events with an HTTPS server.
  • Your server must respond with a 2xx status code within 10 seconds to indicate that the webhook was received successfully.
  • Hellomateo does not follow redirects, so a 3xx response counts as a failed attempt.
  • A delivery can arrive more than once. Use the webhook-id header to ignore deliveries you have already processed.

Retries

A delivery that fails, because your server responds with a status code other than 2xx, does not respond within 10 seconds, or cannot be reached, is retried. Hellomateo makes up to 7 attempts in total. The wait between attempts starts at 10 minutes and doubles after each attempt (10, 20, 40, 80, 160 and 320 minutes, with some random jitter), so the last attempt happens about 10 hours after the first. Until then, the delivery log shows it as retrying, with the response of the latest attempt; after the last failed attempt, it is marked as failed. Respond with 410 Gone to stop a delivery: hellomateo marks it as failed, does not retry it, and disables the webhook unless it is a legacy webhook.

Automatic disabling

Hellomateo disables a webhook that keeps failing, so it stops sending events nobody receives:
  • after 20 deliveries have failed since the last successful one, if at least 24 hours have passed since the first of them failed, or
  • as soon as your server responds with 410 Gone, except for legacy webhooks.
A delivery counts as failed once its last attempt has failed because of your server: a response other than 2xx, a timeout or a connection error. A disabled webhook has active: false, its disabled_at field holds the time it was disabled and disabled_reason why: gone, repeated_failures, or null when it was disabled by hand with POST /v1/webhooks/{id}/disable. The webhook’s page shows both. To enable the webhook again, fix your receiver, then click “Enable webhook” in the menu on the webhook’s page or send POST /v1/webhooks/{id}/enable. Enabling clears disabled_at and disabled_reason, and only failures after that count again. Deliveries for events that happened while the webhook was disabled are not sent.

Resending deliveries

In the delivery log, “Resend” on a delivery sends it again, or use POST /internal/webhooks/{webhook_id}/deliveries/{delivery_id}/resend from the Web App. The resend is a new delivery with its own webhook-id, the same body as the original, and the usual retries. Deliveries can be resent for seven days, and only while the webhook is enabled.

Sending a test event

“Send test event” in the menu on the webhook’s page, or POST /v1/webhooks/{id}/test, sends one signed request to the webhook’s URL right away and shows the response: the status code, headers, body, any connection error, and how long the request took. It is not retried. It appears in the delivery log with its one attempt, and cannot be resent. The test request uses the webhook’s method, authentication and signing secret, like any delivery, including the OAuth2 token and its refresh after a 401. When the token endpoint does not issue a token, the response shows no status code and an error starting with authentication failed:. Its body is an event envelope, for every webhook including legacy ones, whose payloads otherwise have a different shape:
The webhook-id header carries the event’s id. Ignore webhook.test events in the code that handles your real events.

Verifying signatures

Every delivery is signed following the Standard Webhooks specification, so you can check that it was sent by hellomateo and has not been modified. Each request carries these headers:
  • webhook-id: the unique ID of the delivery. It stays the same when a delivery is retried. Hellomateo delivers at least once, so in rare cases the same delivery arrives twice: deduplicate deliveries on this ID.
  • webhook-timestamp: the time of this attempt, in seconds since the Unix epoch.
  • webhook-signature: one or more signatures, separated by spaces, each in the form v1,<signature>. The signature is the base64-encoded HMAC-SHA256 of <webhook-id>.<webhook-timestamp>.<body>, keyed with the base64-decoded part of your signing secret after whsec_.
  • x-webhook-id: on legacy webhooks only, the ID of the webhook that sent the delivery, as before.
Each webhook has a signing secret that starts with whsec_. It is returned once when you create the webhook, and you can read it again with GET /v1/webhooks/{id}/signing-secret, or with “Reveal” under “Signing secret” in the “Settings” tab of the webhook’s page. Roll the secret with POST /v1/webhooks/{id}/signing-secret/roll, or “Roll secret” in the “Settings” tab of the webhook’s page, when it may have leaked or as routine rotation. expires_in_hours sets how long the current secret keeps signing: 24 by default, up to 168 (7 days), or 0 to stop it at once. The Web App offers none, 24 hours and 7 days. Until it expires, deliveries carry one signature per active secret, so you can switch your receiver to the new secret without missing deliveries:
Verify the signature against the raw request body, before parsing it as JSON, and reject deliveries whose timestamp is more than five minutes away from your server’s time. The official Standard Webhooks libraries do both for you. In Node.js, with the standardwebhooks package:
In Python, with the standardwebhooks package:

Upgrading a legacy webhook

A legacy webhook is upgraded when you update it with events, in the latest API version unless you also send api_version:
The update clears event, fields and method: upgraded webhooks always send a POST. From the next delivery on, payloads are event envelopes with the public API model, and the x-webhook-id header is no longer sent. The signing secret, authentication and delivery log stay the same. Update your receiver to handle the new payloads first, or create a second, dated webhook next to the legacy one and delete the legacy webhook once the new one works. Webhooks pin their api_version; see Versioning for moving to a newer one.

Responding to webhooks quickly

To protect your service from being overloaded by webhook deliveries, we recommend responding to the webhook request immediately and handling the processing of the webhook asynchronously. Hellomateo waits at most 10 seconds for a response from your server before counting the attempt as failed and scheduling a retry.