<@U04UQ68083H> Is it possible to add metadata to O...
# ory-copilot
p
@chilly-king-10285 Is it possible to add metadata to Ory sessions?
b
A message from kapa.ai
Based on the provided knowledge sources, it is not directly possible to add custom metadata to Ory sessions. However, Ory sessions do include metadata related to the identity associated with the session. Here's what we can understand from the available information: 1. Ory sessions contain information about the identity, including metadata fields [Session Management Overview](https://www.ory.sh/docs/kratos/session-management/overview). 2. Identities in Ory have two types of metadata: public and admin [Identity Metadata & Traits](https://www.ory.sh/docs/kratos/manage-identities/managing-users-identities-metadata). 3. The public metadata of an identity is included in the session information and can be accessed when retrieving session details [Session Checks](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#session-checks). 4. While you can't directly add metadata to sessions, you can add metadata to the identity associated with the session. This metadata will then be available in the session information. 5. To add or modify metadata for an identity, you need to use the
/admin/identities
APIs [Identity Metadata & Traits](https://www.ory.sh/docs/kratos/manage-identities/managing-users-identities-metadata). 6. When retrieving session information, you can access the identity's metadata, including the public metadata [Session Checks](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#session-checks). If you need to associate additional information with a session, you would need to add it to the identity's metadata (either public or admin) and then access it through the session information. Keep in mind that this metadata is tied to the identity, not specifically to the session.