straight-crayon-13074
05/16/2025, 7:25 PMbrief-egg-61061
05/16/2025, 7:25 PMbrief-egg-61061
05/16/2025, 7:25 PMdefault_schema_id
). If you want to use a different schema for a specific user during registration, you must use the Admin API to create the identity and explicitly set the schema_id
in your request payload. This is not possible through the public self-service registration flow, which always uses the default schema configured for the project. Example using the Admin API: bash curl --request POST \ --header "Authorization: Bearer {ORY_API_KEY}" \ --header "Content-Type: application/json" \ --data '{ "schema_id": "your-custom-schema-id", "traits": { "email": "<mailto:user@example.com|user@example.com>" } }' https://{project-slug}.<http://projects.oryapis.com/admin/identities|projects.oryapis.com/admin/identities>
Replace "your-custom-schema-id"
with the ID of the schema you want to use for this identity. The schema_id
must match one of the schemas configured in your project settings. If you do not specify a schema_id
, the default schema will be used for the new identity [Manage identity schemas](https://www.ory.sh/docs/identities/model/manage-identity-schema/) [Invite users](https://www.ory.sh/docs/kratos/manage-identities/invite-users/). Summary: - The self-service registration flow always uses the default schema. - To specify a different schema per user, use the Admin API and set schema_id
in your request. If you need to change the default schema for all new registrations, update your project's configuration to set a new default_schema_id
[Manage identity schemas](https://www.ory.sh/docs/identities/model/manage-identity-schema/).