# Ory webhooks

Ory webhooks are the HTTP requests an Ory Action sends to your endpoint when a registration, login, settings, recovery or verification flow reaches the point you chose, with a body rendered from your own Jsonnet template.

These pages cover Ory Actions webhooks, whose body you write in a template. Ory's [live event streams](https://www.ory.com/docs/actions/live-events), for enterprise contracts, are a separate feature that sends named events such as `IdentityCreated` to an HTTPS endpoint or AWS SNS.

Agent skill: `npx skills add hookdeck/webhook-skills --skill ory-webhooks` ([details](https://hookdeck.com/webhooks/ory/skill))

> Independent reference generated from hookdeck/webhook-registry (commit ff7f882, 20 Nov 2026). [Ory's official docs](https://www.ory.com/docs/guides/integrate-with-ory-cloud-through-webhooks).

[Overview](https://hookdeck.com/webhooks/ory) · [MCP events](https://hookdeck.com/webhooks/ory/mcp-events) · [Verify signatures](https://hookdeck.com/webhooks/ory/verify) · [Production guide](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts) · [Agent skill](https://hookdeck.com/webhooks/ory/skill)

## Key facts

| Fact | Value | Source |
|---|---|---|
| Signature header | `None (unsigned)` | [Ory docs](https://www.ory.com/docs/guides/integrate-with-ory-cloud-through-webhooks) |
| How events are identified | `None from Ory: your Jsonnet template sets the body` | [Ory docs](https://www.ory.com/docs/guides/integrate-with-ory-cloud-through-webhooks) |
| Body format | `JSON` | [Ory docs](https://www.ory.com/docs/guides/integrate-with-ory-cloud-through-webhooks) |
| Other headers | `ory-webhook-request-id, ory-webhook-trigger-id` | [Ory source](https://raw.githubusercontent.com/ory/kratos/master/selfservice/hook/web_hook.go) |
| Agent skill | `npx skills add hookdeck/webhook-skills --skill ory-webhooks` | [Agent skill →](https://hookdeck.com/webhooks/ory/skill) |

[Verify Ory webhooks](https://hookdeck.com/webhooks/ory/verify)

## How Ory webhooks work

An Action tells your systems about a flow as it happens, so a new sign-up can reach your CRM without you polling the identity API. Each one is set on a flow and a position: `before` or `after`, plus `submit` and `failure` for login. A webhook with `response.ignore: true` is non-blocking: it runs in the background and Ory ignores your response. Without it, the flow waits for you.

Ory defines no event list, envelope or version for these requests, and adds no event field. The body is what your Jsonnet template renders from `ctx`, which holds `flow`, `request_headers`, `request_method`, `request_url`, `location` and `ip_labels`, plus `identity` and `transient_payload` on `after` hooks. To route requests, put an event name in every template or give each action its own path.

## Setting up Ory webhooks

- In the Ory Console, go to Authentication > Actions & Webhooks and click + Create new Action. Choose the flow and when it runs, enter the URL and method, then set authentication and the Jsonnet body. Project config uses `hook: web_hook`.
- Set `response.ignore: true` on any webhook that only notifies another system. Use `api_key` with `in: header`, so your endpoint can read and compare the value.
- Ory Network can't reach localhost, so test through a public URL. `hookdeck listen 3000 ory --path /webhooks/ory` gives you one and forwards requests to your machine. Then run the flow, for example by registering a test user.
- If your endpoint sits behind a firewall, allow [Ory Network's IP addresses](https://www.ory.com/docs/guides/allowlist) for your region. Ory documents no way to resend a request.

## Delivery behaviour

- **Timeout:** 30 seconds. per attempt; 10 seconds on the login `failure` trigger. [Guide](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#timeouts)
- **Retries:** up to 3 attempts. 1 second, then 2 seconds apart, after a timeout, connection failure, `429` or most `5xx`. [Guide](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#retries)
- **After retries:** no resend documented. a non-blocking webhook's flow carries on; nothing surfaces the loss. [Guide](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#retries)
- **Duplicates:** possible. a retry can repeat a request, so key on an ID you send. [Guide](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#duplicates)

## Known failure modes

1. **A short outage loses requests.** Ory makes three attempts, waiting 1 second and then 2 seconds, so an endpoint answering `503` uses them all within seconds. A non-blocking webhook's flow carries on regardless, so reconcile against the identities API for anything you can't miss. [Plan for lost requests](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#retries)
2. **A slow endpoint blocks sign-in.** A webhook without `response.ignore: true` makes the flow wait, and a failure surfaces as `webhook_timeout` or `webhook_request_failed`. Use non-blocking webhooks for anything that only notifies. [Keep sign-in independent](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#other-limits)
3. **The same request arrives twice.** Ory retries an attempt that timed out, even if your handler finished the work. Put `ctx.flow.id` in the template and deduplicate on it with your event name and the identity ID. [Handle duplicates](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#duplicates)
4. **Requests with nothing to route on.** The body is only what your template renders, and Ory adds no event name. Add an `event` key to every template, or give each action its own path. [Name your events](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#choosing-events)

From [Hookdeck's Ory guide](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts).

## Ory webhook best practices

- **[Default to non-blocking](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#other-limits).** Set `response.ignore: true` on anything that only informs another system, so your endpoint's availability stays out of your login path.
- **[Name the event in every template](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#choosing-events).** Ory adds no event field. Send an `event` key of your own, or give each action its own path.
- **[Deduplicate retried requests](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#duplicates).** A timed-out attempt is sent again even if your handler finished the work. Put `ctx.flow.id` in the template and key on it with your event name and the identity ID.
- **[Return a 2xx quickly](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#timeouts).** Each attempt times out after 30 seconds. Check the key, store the request, respond, and do the work afterwards.
- **[Reconcile what must not be missed](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#retries).** Retries end within seconds of a failing response. Check the Ory identities API on a schedule for anything you can't afford to lose.
- **[Run the session hook last](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts#other-limits).** On `after` registration, the session hook modifies the response and no hook runs after it, so a webhook placed behind it never fires.

## In this hub

- [MCP events](https://hookdeck.com/webhooks/ory/mcp-events): How an agent subscribes to Ory events as MCP events.
- [Verify signatures](https://hookdeck.com/webhooks/ory/verify): Signature facts, verification code and common failures.
- [Production guide](https://hookdeck.com/webhooks/ory/guide-duplicates-ordering-retries-timeouts): Production problems, such as timeouts and retries, and how to handle them.
- [Agent skill](https://hookdeck.com/webhooks/ory/skill): Install the webhook skill in your coding agent. `npx skills add hookdeck/webhook-skills --skill ory-webhooks`
---

Not affiliated with Ory. Facts are compiled from public sources and linked inline. [View as JSON](https://hookdeck.com/webhooks/ory.json) · [Report a correction](https://hookdeck.com/contact)
