<@U04UQ68083H> What is the shape of the response p...
# ory-copilot
l
@chilly-king-10285 What is the shape of the response payload for flow-interrupting webhooks?
c
A message from kapa.ai
New message text here
l
@chilly-king-10285 How is
instance_ptr
used by Ory?
c
A message from kapa.ai
The
instance_ptr
is used in the response payload of flow-interrupting webhooks to indicate the field where there is an error. It helps Ory understand which field in the user input has an issue and needs to be addressed. For example, in the following payload:
Copy code
json {   "messages": [     {       "instance_ptr": "#/traits/foo/bar",       "messages": [         {           "id": 123,           "text": "field must be longer than 12 characters",           "type": "validation",           "context": {             "value": "short value"           }         }       ]     }   ] }
The
instance_ptr
value
#/traits/foo/bar
points to the field with an error, which helps Ory handle the error accordingly. Source: [https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks](https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks)
l
@chilly-king-10285 is the JSON document at the root of the
instance_ptr
pointer the Ory identity?
c
A message from kapa.ai
Hmm, I don't know enough to give you a confident answer yet. However, you can find more information about Ory and its features in the [official documentation](https://www.ory.sh/docs).
l
@chilly-king-10285 What is the shape of the payload for a 200 OK response for a flow-interrupting webhook where I do not want to modify the identity?
c
A message from kapa.ai
New message text here
l
@chilly-king-10285 Thank you!
c
A message from kapa.ai
You're welcome! If you have any more questions or need further assistance, feel free to ask.
m
Hope it was useful Brandon 🙂 No need to to thank the bot btw it does not have any feelings 🥲ory bot
l
Just doing my part to help with AI alignment.
But actually @magnificent-energy-493 still a bit confused with the error response. Would it end up in the flow similar to one of these errors? https://www.ory.sh/docs/kratos/concepts/ui-user-interface#ui-message-codes
For context, if anyone else is reading this thread looking for answers, if you set
instance_ptr
to
'#/'
it results with your
messages
being added to
flow.ui.messages
. I think any
type
other than
'error'
will be converted to
'info'
. If
instance_ptr
is
'#/identifier'
, it results with your
messages
being added to the object in
flow.ui.nodes
with
attributes.name
===
'identifier'
.