<@U04UQ68083H> What is the expected response forma...
# ory-copilot
b
@chilly-king-10285 What is the expected response format when using Webhooks?
b
A message from kapa.ai
When using webhooks with Ory, the expected response format depends on the specific use case and configuration. Here's an overview of the common response formats: 1. For general webhook responses: - A 204 or 200 HTTP status code without a response body to accept the token exchange without modification. - A 403 HTTP status code to deny the token exchange. - A 200 HTTP status code with a JSON response body to modify claims or instruct Hydra to proceed with token exchange. [Responding to the webhook](https://www.ory.sh/docs/hydra/guides/claims-at-refresh#responding-to-the-webhook) 2. For modifying identities: - A 200 OK response code with a JSON object containing the
identity
key to change the identity before saving to the database. - A 200 OK response code with a JSON object containing the
identity.traits
key to replace identity traits. [Modify identities](https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#modify-identities) 3. For updating verification or recovery addresses: - A 200 OK response code with a JSON object containing the
identity.verifiable_addresses
key to replace identity verification addresses. [Update verification or recovery addresses](https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#update-verification-or-recovery-addresses) 4. For flow-interrupting webhooks: - HTTP response codes 1xx, 2xx, and 3xx allow the flow to continue. - HTTP response codes 4xx and 5xx interrupt the flow and return a predefined payload. [Flow-interrupting webhooks](https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#flow-interrupting-webhooks) It's important to note that the specific response format may vary depending on the webhook configuration and the intended action. Always refer to the Ory documentation for the most up-to-date and specific information regarding webhook response formats for your particular use case.