Skip to main content
Webhooks deliver real-time HTTP notifications to your own services whenever data changes in a project. When a record is inserted, updated, or deleted on any Data Model table, Archie sends a signed POST to a URL you control, with the event payload in the body. This page covers webhooks Archie sends from your project to external systems. For incoming webhook handling on the integration side (Stripe events, GitHub events, etc.), see Integrations → Webhooks.

How it works

  1. Register a webhook subscription: which table, which events, which URL.
  2. Data changes — every matching mutation (REST or GraphQL) publishes an event.
  3. Delivery — the webhook service POSTs to your URL with the payload.
  4. Verify — your endpoint validates the HMAC signature, then processes the event.
  5. Retry — non-2xx responses retry with exponential backoff up to 5 attempts.

Webhook management API

All management endpoints live under /api/rest/_webhooks and require a management API token.

Required headers

The environment header is required on every webhook management request, including GET and DELETE.

Create a webhook

Filtering events

Only deliver when the record matches a condition:

Selecting fields

Limit the payload to specific fields — useful for keeping payloads small or avoiding sensitive data in webhook bodies:

Event payload

When a matching change happens, Archie delivers an HTTP POST to your URL with this body:
For DELETE, record reflects the row’s state immediately before deletion.

Delivery headers

Each delivery includes:

Verifying signatures

Always verify the HMAC signature before processing the payload — never trust an unsigned webhook body.

Node.js

Python

Always use a constant-time comparison (timingSafeEqual, hmac.compare_digest) to avoid leaking the signature one byte at a time.

Retries and circuit breakers

If your endpoint returns a non-2xx status or doesn’t respond, the webhook service retries with exponential backoff: After the maximum attempts, the delivery moves to a dead-letter state and shows up in GET /_webhooks/{id} for inspection. A circuit breaker protects your endpoint from sustained failures: after 5 consecutive failures, deliveries pause for a 2-minute cooldown, then retry. This avoids hammering an endpoint that’s clearly down.

Inspecting deliveries

GET /api/rest/_webhooks/{id} returns the subscription and recent delivery history:
Use this endpoint as part of your monitoring — alert if a webhook accumulates failed deliveries.

Best practices

  • Always verify signatures. Never trust an unsigned payload.
  • Respond fast. Return 200 within 5 seconds. Process the event asynchronously if needed.
  • Deduplicate by event id. The same event may be redelivered if your endpoint returns a non-2xx — process the work once.
  • Use HTTPS. Webhook URLs must be HTTPS.
  • Monitor for dead-letter deliveries. Check /_webhooks/{id} regularly or wire it to alerting.

FAQ

Use webhooks for server-to-server delivery — your backend reacts to data changes from another machine. Use GraphQL subscriptions for client UIs — a browser stays connected over a WebSocket and receives events while it’s open. Webhooks retry; subscriptions don’t.
Network failures or 5xx responses trigger a retry. The retry uses the same event id (X-Archie-Delivery), so you can deduplicate by tracking processed event ids on your side. At-least-once delivery is the trade-off for guaranteed delivery on transient failures.
Yes — PATCH the subscription with a new secret. To rotate without downtime, configure your endpoint to accept either the old or new secret during the rotation window, then drop the old one once the new is in place.
Deliveries retry up to 5 times over a few minutes, then move to dead-letter. They aren’t auto-redelivered after that — you’d need to read the dead-letter list and replay them yourself. For at-least-once-with-long-windows guarantees, plan endpoint reliability accordingly.
Yes. Multiple subscriptions to the same table-and-event combination each receive a copy of the event. Useful for sending the same event to different downstream systems.