<@U04UQ68083H> Can i create a new identity schema ...
# ory-copilot
f
@chilly-king-10285 Can i create a new identity schema via api?
c
A message from kapa.ai
Based on the provided knowledge sources, there is no direct information about creating a new identity schema via API. However, you can create a custom identity schema in the Ory Console or Ory CLI. Here are the steps: 1. Sign in to Ory Console and select [Identity Schema](https://console.ory.sh/projects/current/identity-schema). 2. Using the dropdown menu, select one of the preset schemas or the empty template as the starting point for your custom schema. 3. Check the Customize Identity Schema box to enable editing of the schema. 4. Adjust the schema to your needs. Add, remove, or adjust traits. 5. Define the name of the custom schema in the Identity Model Schema text box. 6. Click the Update button to save. You can also encode your schema to Base64 and export it to a variable, then update your project's configuration using the Ory CLI:
Copy code
bash # Encode your schema to Base64 and export it to a variable.   schema=$(cat {path-to-json-with-identity-schema} | base64)      # Update your project's configuration.   ory patch identity-config {your-project-id} \     --replace '/identity/default_schema_id="{unique-schema-id}"' \     --replace '/identity/schemas=[{"id":"{unique-schema-id}","url":"base64://'$schema'"}]'
For more detailed information, please refer to the [Ory documentation](https://www.ory.sh/docs/identities/model/manage-identity-schema).