Skip to content

docs: document deleting custom identity schemas#2539

Open
KT-Doan wants to merge 8 commits into
ory:masterfrom
KT-Doan:feat/document-identity-schema-delete
Open

docs: document deleting custom identity schemas#2539
KT-Doan wants to merge 8 commits into
ory:masterfrom
KT-Doan:feat/document-identity-schema-delete

Conversation

@KT-Doan

@KT-Doan KT-Doan commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a "Delete a custom schema" section to the manage identity schemas page, covering both the Console UI flow and a cURL example using a workspace API key against the Console API.

Documents the constraints surfaced by the API: the deletion is rejected (409) if the schema is still attached to a project or referenced by an identity. The section also calls out that presets cannot be deleted and that an attachment to a project is permanent for the lifetime of that project.

Pairs with the cloud-side endpoint and Console UI changes that introduced the delete capability.

Test plan

  • Local docusaurus build renders the new section without lint errors
  • Links to personal-access-token.mdx#authorizing-ory-network-workspace-admin-apis resolve
  • <ConsoleLink route="project.identitySchema" /> resolves to the existing schema page

@KT-Doan KT-Doan changed the title docs: document deleting custom identity schemas docs: document deleting custom identity schemas (do not merge) May 4, 2026
Comment thread docs/identities/model/manage-identity-schema.mdx Outdated
Comment thread docs/identities/model/manage-identity-schema.mdx Outdated
Comment thread docs/identities/model/manage-identity-schema.mdx Outdated
Co-authored-by: unatasha8 <una.cogavin@ory.sh>
@unatasha8

Copy link
Copy Markdown
Contributor

What do you mean by "an attachment to a project is permanent for the lifetime of that project"? You are able to change a project's schema so a schema is not permanently 'attached' for the lifetime of the project.

@KT-Doan

KT-Doan commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

What do you mean by "an attachment to a project is permanent for the lifetime of that project"? You are able to change a project's schema so a schema is not permanently 'attached' for the lifetime of the project.

When we add a schema to a project its attached to the historical project revision, so identities can still reference that schema even if it's technically not in the project's current state

@unatasha8

Copy link
Copy Markdown
Contributor

What do you mean by "an attachment to a project is permanent for the lifetime of that project"? You are able to change a project's schema so a schema is not permanently 'attached' for the lifetime of the project.

When we add a schema to a project its attached to the historical project revision, so identities can still reference that schema even if it's technically not in the project's current state

So once a schema has been added to a project it cannot be deleted.

@KT-Doan

KT-Doan commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

What do you mean by "an attachment to a project is permanent for the lifetime of that project"? You are able to change a project's schema so a schema is not permanently 'attached' for the lifetime of the project.

When we add a schema to a project its attached to the historical project revision, so identities can still reference that schema even if it's technically not in the project's current state

So once a schema has been added to a project it cannot be deleted.

That is correct, at least not for now. This is the current state as we haven't found a good way of deleting schemas that are attached to a project w/out breaking things.

@vinckr vinckr added the upstream Issue is caused by an upstream dependency. label Jun 3, 2026
@KT-Doan KT-Doan changed the title docs: document deleting custom identity schemas (do not merge) docs: document deleting custom identity schemas Jun 22, 2026
@KT-Doan KT-Doan requested a review from unatasha8 June 23, 2026 06:25
@KT-Doan

KT-Doan commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

This feature has been released @unatasha8 PTAL again!

@unatasha8 unatasha8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

-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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not say 'If the schema is used by a project or references an identity..."

The use of 'still' implies that it can be in use and not in use, but we already say once a schema is used by a project it cannot be removed.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove 'currently'. Once a schema is attached to a project it can never be unattached... so it will always be 'currently' attached.

Drop "currently" from the Console disabled-button note (an attachment is
permanent for the project's lifetime, so it is never merely current) and
replace "still in use" with the explicit "used by a project or referenced
by an identity" condition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream Issue is caused by an upstream dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants