Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/identities/model/manage-identity-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,40 @@ However, you can use the existing schema as a template to create a new schema. S
It's recommended to manage identity schemas in version control. Learn more about
[managing Ory Network configuration in git](../../guides/gitops).

## Delete a custom schema

Custom schemas you no longer need can be deleted. The deletion is rejected if the schema is still attached to a project or is
Comment thread
unatasha8 marked this conversation as resolved.
Outdated
referenced by an identity. Once a schema is attached to a project, that attachment cannot be removed, so the schema cannot be
Comment thread
KT-Doan marked this conversation as resolved.
Outdated
deleted as long as it remains in use.
Comment thread
KT-Doan marked this conversation as resolved.
Outdated

Presets cannot be deleted.

<Tabs>
<TabItem value="console" label="Ory Console" default>

1. Go to <ConsoleLink route="project.identitySchema" />.
2. Find the schema you want to delete in the **Custom schemas** section.
3. Open the row menu (three dots) and select **Delete schema**.
4. Confirm the deletion in the dialog.

If **Delete schema** is disabled, the schema is currently attached to a project and cannot be deleted.

</TabItem>
<TabItem value="curl" label="cURL">

Delete a schema through the Ory Network Console API using a
[workspace API key](../../concepts/personal-access-token.mdx#authorizing-ory-network-workspace-admin-apis):

```shell
curl -X DELETE "https://api.console.ory.sh/identity-schemas/$SCHEMA_ID" \
-H "Authorization: Bearer $ORY_WORKSPACE_API_KEY"
```

If the schema is still in use, the API returns `409 Conflict` with the number of projects that reference it.

</TabItem>
</Tabs>

## Update identities to use a new schema

Updating the identity schema of a project can result in inconsistencies between the new schema and the identities created with the
Expand Down
Loading