<@U04UQ68083H> Can I add a `transient_payload` to ...
# ory-copilot
l
@chilly-king-10285 Can I add a
transient_payload
to verification flows?
b
A message from kapa.ai
Yes, you can add a
transient_payload
to verification flows in Ory. The
transient_payload
is an optional field that allows you to pass additional data along with the verification flow. This feature is available in both the Ory API and Kratos API. According to the API references, the
transient_payload
is described as: > Transient data to pass along to any webhooks This field is included in the request body for the
updateVerificationFlow
method in both the [Ory API](https://www.ory.sh/docs/reference/api) and [Kratos API](https://www.ory.sh/docs/kratos/reference/api). The
transient_payload
is of type
object
, which means you can include any JSON-compatible data structure. This data is not persisted by Ory but is passed along to webhooks, allowing you to include additional context or information with the verification flow. It's worth noting that this feature is similar to the
transient_payload
available in registration flows, as mentioned in a [GitHub issue comment](https://github.com/ory/network/issues/187): > The content of this field must be a valid json object. It will be presented to any post registration webhook. (See [here](https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#customizing-request-body-with-jsonnet) for the webhook body and how to customize it). While this comment specifically mentions registration flows, the same concept applies to verification flows as well. Remember that the
transient_payload
is optional, so you only need to include it if you have additional data you want to pass along with the verification flow.
l
@chilly-king-10285 which version of the
@ory/client
npm package was this introduced in?
b
A message from kapa.ai
According to the GitHub issue comment in the [Ory Network repository](https://github.com/ory/network/issues/187), the
transient_payload
feature for flows was introduced in version 1.1.18 of the
@ory/client
npm package. The comment states: > This feature is available in the SDK starting from [v1.1.18](https://www.npmjs.com/package/@ory/client/v/1.1.18) While this specific comment was referring to the registration flow, it's reasonable to assume that the
transient_payload
feature for verification flows was introduced in the same version or earlier, as the API structure for different flows is often consistent. However, it's important to note that the information provided doesn't explicitly mention the verification flow. If you need to be absolutely certain about the version for verification flows specifically, you may want to check the changelog for the
@ory/client
package or consult the official Ory documentation for more detailed information.