miniature-waitress-95147
09/01/2025, 1:15 PMchilly-king-10285
09/01/2025, 1:15 PMchilly-king-10285
09/01/2025, 1:16 PM{
"messages": [
{
"instance_ptr": "#/traits/foo/bar",
"messages": [
{
"id": 123,
"text": "field must be longer than 12 characters",
"type": "error",
"context": {
"value": "short value"
}
}
]
}
]
}
This requires config.response.parse: true ([Webhook guide – Flow-interrupting webhooks](https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#flow-interrupting-webhooks)). - Modify the identity before it’s saved: Enable parsing and return 200 with a JSON body containing identity fields to replace. Supported keys: - identity (entire identity object fields you set will replace existing ones) - identity.traits (replaces the whole traits object) - identity.metadata_public / identity.metadata_admin (each replaces its whole object) - identity.verifiable_addresses and identity.recovery_addresses (must be consistent with traits) Example: {
"identity": {
"traits": {
"email": "<mailto:joe@example.org|joe@example.org>",
"another_value": "example"
}
}
}
Requires config.response.parse: true; only available in registration and settings flows ([Webhook guide – Modify identities](https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#modify-identities)). Notes: - The session action (auto sign-in) modifies the HTTP response and must run last; otherwise subsequent hooks won’t execute ([Actions – Sign in after registration](https://www.ory.sh/docs/actions/session)). This affects hook ordering but not the webhook response schema itself. - For native clients, if the session action runs, Ory’s own response includes session and session_token; this is unrelated to your webhook’s response body schema ([Registration – API clients](https://www.ory.sh/docs/kratos/self-service/flows/user-registration#api-clients), [Actions – session](https://www.ory.sh/docs/actions/session)).miniature-waitress-95147
09/01/2025, 1:19 PMchilly-king-10285
09/01/2025, 1:19 PMchilly-king-10285
09/01/2025, 1:19 PMchilly-king-10285
09/01/2025, 1:20 PMchilly-king-10285
09/01/2025, 1:20 PM