# Webhooks

> Pick the events you care about and we POST each one to your HTTPS address the moment it happens, signed, retried and logged.

A webhook is an address of yours that we call whenever one of the events you picked happens. Each call is a `POST` with the event as JSON, [signed](https://www.zenhalab.com/www/zenhalab/en/developers/integrations/verify-signatures) so you know it came from us.

## Add an endpoint {#add}

1. Open the app's **Integrations** page and choose **Add endpoint**.
2. Paste the **Endpoint URL**: an `https://` address that accepts `POST`. Private and internal addresses (`localhost`, `10.…`, `192.168.…`, cloud metadata) are refused, now and at every delivery.
3. Optionally add a **Description (optional)**, like *Guest list sheet*.
4. Pick the **Events to send**. The [event catalog](https://www.zenhalab.com/www/zenhalab/en/developers/integrations/events) says what each one means and carries.
5. Save, and copy the signing secret it shows you. You can reveal it again later on the endpoint's **Settings** tab.

*Adding an endpoint: its address, a description and the events it gets.*

Then choose **Send test event**: we send an example of the event you pick right away, signed like a real one and marked `"test": true`, and show what your endpoint answered.

> [!TIP]
> Receiving in Zapier, Make or n8n? Their "catch webhook" triggers give you a URL to paste here. They don't need the secret; your own code should check it.

## What your endpoint receives {#request}

```http
POST /your/path HTTP/1.1
Content-Type: application/json
User-Agent: ZenhaLab-Webhooks/1.0
webhook-id: 5d0c6f2e-1b7a-4e3c-8f9d-2a1b3c4d5e6f
webhook-timestamp: 1791115200
webhook-signature: v1,bm9fcmVhbF9zaWduYXR1cmVfaGVyZQ==

{
  "id": "5d0c6f2e-1b7a-4e3c-8f9d-2a1b3c4d5e6f",
  "type": "…",
  "timestamp": "2026-10-04T12:00:00.000Z",
  "version": 1,
  "app": "…",
  "subject": { "type": "…", "id": "…" },
  "data": { … }
}
```


| Body field | What it is |
| --- | --- |
| `id` | The event's id. The same on every retry and resend: use it to skip events you already handled. |
| `type` | The event type: what happened (see the [event catalog](https://www.zenhalab.com/www/zenhalab/en/developers/integrations/events)). |
| `timestamp` | When it happened (ISO 8601, UTC). |
| `version` | The payload's version. It changes only when a field is removed or changes meaning; new fields can appear at any time. |
| `app` | The app it happened in. |
| `subject` | What it's about: its `type` and `id`. |
| `data` | The event's own fields, listed in the [event catalog](https://www.zenhalab.com/www/zenhalab/en/developers/integrations/events). |
| `test` | `true` on test events only. |

The three `webhook-*` headers follow the [Standard Webhooks](https://www.standardwebhooks.com) spec. [Verify the signature](https://www.zenhalab.com/www/zenhalab/en/developers/integrations/verify-signatures) before you trust the body.

## Answer fast, with a 2xx {#answer}

Answer with any `2xx` status **within 10 seconds**. Anything else counts as a failure: another status, a timeout, a connection error, or a redirect (we never follow them). Keep the answer short; we read at most 64 KB of it (the status decides, a longer answer is simply cut) and keep only its first 2 KB in the log.

Doing something slow with the event? Store it, answer `200`, and do the work afterwards.

## Retries {#retries}

A failed delivery is tried again after **30 seconds, 2 minutes, 10 minutes, 30 minutes, 1 hour, 3 hours, 6 hours, 12 hours and 24 hours** (each give or take 10%): 10 attempts over about two days. When you answer `429` or `503` with a `Retry-After`, we wait that long instead (up to 6 hours). After the last attempt the delivery is **Failed**, and stays in the log for you to resend.

Deliveries can arrive **out of order** and, rarely, **more than once** (a retry after a timeout your side actually processed). Use `id` to skip repeats and `timestamp` to order them.

## The delivery log {#log}

Open an endpoint to see its **Deliveries**: each event, its state, every attempt with the status and the start of what your endpoint answered, and the exact body that was signed.

- **Send again** sends one again, with its original `id`.
- **Resend failed** sends again every delivery that failed in a period you pick (the last hour, day, 3 days, week, or since it started failing).
- Filters show what's **Failed** or still **Waiting**.

Deliveries are kept as long as their event (30 days for most, 7 days for messages and scans). Test deliveries go after 7 days.

## When an endpoint keeps failing {#turned-off}

An endpoint that fails for **72 hours without a single success** (and at least 10 times in a row) is **turned off**: we stop sending to it, its waiting deliveries move to Failed, and the people who manage it get one e-mail. Fix your receiver, choose **Turn back on**, and resend what failed since it started failing.

You can also **Pause** an endpoint yourself: nothing new is sent until you turn it back on, and what was waiting can be resent then.

## Rotate the secret {#rotate}

On the endpoint's **Settings** tab, choose **Rotate secret** and how long the old secret keeps working: no time, 1 hour, 24 hours or 3 days. While both work, every delivery carries **two signatures**, one per secret, so you can update your receiver without missing an event.

## Limits {#limits}

- Each endpoint gets at most 4 deliveries at a time and 120 a minute; the rest wait their turn.
- Test events: 30 every 10 minutes. Resends: 120 every 10 minutes.
- Endpoints: 5 per person across Nehenoi, Techauka and Zanemotau; a Ñomongeta workspace's plan sets its own (up to 25). Triggers subscribed by Zapier, Make or n8n count too.
