From e99a8de1421f1c5097080ed6840b355a4c563fca Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Wed, 20 Aug 2025 11:34:14 +0200 Subject: [PATCH] feat: document external_id in webhook --- ...integrate-with-ory-cloud-through-webhooks.mdx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/guides/integrate-with-ory-cloud-through-webhooks.mdx b/docs/guides/integrate-with-ory-cloud-through-webhooks.mdx index f449853b1..47afe288f 100644 --- a/docs/guides/integrate-with-ory-cloud-through-webhooks.mdx +++ b/docs/guides/integrate-with-ory-cloud-through-webhooks.mdx @@ -523,6 +523,22 @@ verification or recovery addresses, these will be deleted unless the identity tr } ``` +#### Update the identity's external ID + +When the webhook target returns a 200 OK response code and the response body is a JSON object with the key `identity.external_id` +in it, the value from that object will be used to replace the identity's external ID before it is saved to the database. This +method replaces the previous external ID, if any. + +```json +{ + "identity": { + // highlight-start + "external_id": "external-id-from-webhook" + // highlight-end + } +} +``` + ### Flow-interrupting webhooks If you want the result of webhook execution to have the potential of interrupting the flow, you can configure the webhook to parse