<@U04UQ68083H> how can i know if my after registra...
# ory-copilot
f
@chilly-king-10285 how can i know if my after registration hook is pre persist or post persist hook?
b
A message from kapa.ai
To determine if your "after registration" hook is a pre-persist or post-persist hook in Ory, you need to look at how and where the hook is configured: - Pre-persist hooks run before the identity is created in the system. - Post-persist hooks run after the identity has been created. According to the documentation, when configuring webhooks, the
response.parse
option determines when the hook is executed: - If you set
response.parse: true
, the webhook is called before the system creates a new identity (pre-persist). - If you set
response.parse: false
, the webhook is called after the system creates a new identity (post-persist). You can define both types by adding two webhooks with different
parse
values:
Copy code
yaml - hook: web_hook     config:       response:         parse: true   # Pre-persist - hook: web_hook     config:       response:         parse: false  # Post-persist
So, check your hook configuration for the
response.parse
setting to know if it's pre- or post-persist. If
parse
is
true
, it's pre-persist; if
false
, it's post-persist. For more details, see the [webhook response handling documentation](https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#flow-interrupting-webhooks).