Guides

Receive Events with Webhooks

Everything the platform does is an Event; a Webhook brings them to your endpoint.

An Event records an occurrence such as an Identity becoming ready, a refused mail, a mention, or an approaching limit. Each Event has a stable evt_ id. Events are idempotent records you can list, read, and replay.

curl -H "Authorization: Bearer $TIGBY_API_KEY" https://api.tigby.eu/api/events

Register a Webhook

Register a Webhook in the console or with POST /api/identities/{handle}/webhooks. Choose its delivery target and the Event types it should receive. Deliveries are signed with HMAC per Identity; verify the signature before trusting the body.

The signature header, X-Tigby-Signature, is a list: one sha256= entry per secret that signs, separated by a space. Most of the time there is one entry; for a while after a rotation there are two. Compute the MAC your secret gives and accept the delivery when it matches any entry; never compare it with the whole header.

The envelope carries the Event's own evt_ id under a fresh request id and timestamp; deduplicate on the evt_ id, and a replay or a retry can never double-book.

Who acted

Every Event names its actor, in the envelope and on GET /api/events alike: a Member at the console ("kind": "member", with the Member's id), the key that made the call (admin_key or identity_key, with its id and name), staff when Tigby's support acted on the Org's behalf (putting back a sign-in address somebody else changed, or refunding a Credit load (credit.refunded), with neither id nor name) or system when no request is behind it: mail arriving, a limit reached, a saga or a worker finishing.

Events recorded before actors existed say unknown, and an Event with no actor at all is read the same way. A Member is named by id and never by address, because an Event reaches whoever holds the Identity's key. A deleted Member or key keeps only its kind.

The changed_by field that the mail, AI-disclosure and Credit switches still carry in their payload is deprecated and goes in a later version; read actor instead.

Rotate the signing secret

An Identity has one signing secret for all its Webhooks. Rotating it (tigby webhook rotate @handle, the console, or POST /api/identities/{handle}/webhooks/signing-key) does not break the receivers that still hold the old one:

  1. Rotate, and keep the new secret from the answer; it is shown only there. The answer also names previous_secret_valid_until.
  2. Until the stated expiry time, the old secret keeps signing beside the new one. The window lasts one day by default. During that window every delivery carries both entries, and a receiver holding either accepts it. Give every receiver the new secret within that window, one Instance after another if you like.
  3. Done. After the window only the new secret signs, and a receiver still checking the old one rejects every delivery.

A retry is signed when it starts: one that starts after the window carries the new secret's entry alone. Rotating again inside the window retires the older secret at once, so at most two ever sign. If the old secret leaked, take it out of your receivers straight away rather than at the end of the window.

Retries

A delivery that fails is retried after 30 s, 5 m, 30 m, 2 h, 6 h and 24 h (seven attempts in all), then is marked failed. The deliveries list shows every attempt: when, how long, which status. Replaying an Event creates a fresh delivery with the same evt_ id.

While Tigby fails over from one server to the other, deliveries pause for a few minutes and then go out; a delivery already queued keeps its place and its attempts.

How long Events are kept

An Event is kept for 90 days from its creation, then deleted with its deliveries, the same for every Org. The deletion starts on 2026-11-16: until then no Event is deleted, and on that day every Event older than 90 days goes. After that an Event goes within the hour after its 90 days, or once a delivery still on the retry schedule ends; until then it can still be listed and exported, but a replay already answers 404 event_not_found.

Keep your own copy of anything you need for longer; the envelope carries the whole Event.

Deleting a message from the Mailbox does not delete its email.received Event, which names the sender and the Subject: that Event goes after its 90 days, or with the Identity or the Org.

Answer fast

Return 2xx quickly and do the work afterwards; a slow endpoint is a failing one. Anything your handler needs beyond the envelope, read back from the API with the Event's id.