Files
zitadel/apps/docs
247e278505 feat: delete metadata on SetUserMetadata api (#11776)
# Which Problems Are Solved

Currently, to delete metadata a key, callers must use a separate
[DeleteMetadata](https://zitadel.com/docs/reference/api/user/zitadel.user.v2.UserService.DeleteUserMetadata)
API. This increases the complexity on client-side for operations where
metadata need to be synchronized.

# How the Problems Are Solved

Introduce the behavior to
[SetUserMetadata](https://zitadel.com/docs/reference/api/user/zitadel.user.v2.UserService.SetUserMetadata):

When a metadata entry is passed with an empty value ("" / empty bytes):

- If the key exists → delete the key
- If the key does not exist → no-op (idempotent, no error)

# Additional Changes

- Updated [User Metadata
page](https://zitadel.com/docs/guides/manage/customize/user-metadata#manage-user-metadata-through-the-management-api)

# Additional Context

Similar behavior will be applied to
[UpdateUser](https://zitadel.com/docs/reference/api/user/zitadel.user.v2.UserService.UpdateUser)
and
[SetOrganizationMetadata](https://zitadel.com/docs/reference/api/org/zitadel.org.v2.OrganizationService.SetOrganizationMetadata)

Breaking change? 
Currently, sending an empty value returns an error — no client should be
intentionally relying on that error as part of a working workflow. The
change goes from "rejected input" to "accepted input with defined
semantics."

In other words, it relaxes a restriction rather than tightening one.
Existing valid calls continue to work exactly as before. The only
scenario where it could be "breaking" is if someone explicitly depends
on the error response for empty values (e.g., using it as a validation
check), which would be unusual.

---------

Co-authored-by: Gayathri Vijayan <gayathri+github@zitadel.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-06 14:57:52 +01:00
..
2026-01-30 18:11:12 +00:00

@zitadel/docs

Documentation for Zitadel, built with Fumadocs and Next.js.

Getting Started

Ensure you have followed the root quick start to set up dependencies.

Local Development

Start the development server:

pnpm nx run @zitadel/docs:dev

The site will be available at http://localhost:3000.

Scripts

Key scripts for documentation workflows:

Script Description
dev Starts the development server.
build Builds the production application.
fetch:remote-content Fetches remote tags and referenced content.
generate Runs all generation steps (fetch:remote-content, generate:proto-docs, generate:api-reference, generate:index-pages).
check:links Validates content integrity (broken links, missing frontmatter, schema errors).
check-types Validates typescript types.
test Runs all validation steps (check-types, check:links).
lint checks for code style and syntax errors (ESLint).
clean Cleans the build output and generated files.

Validation

  • Code Quality: Run pnpm lint to check for syntax and style issues in JS/TS/MDX files.
  • Content Integrity: Run pnpm check:links to validate content structure, including:
    • Broken internal links
    • Missing required front-matter (e.g., title)
    • Image references

Contributing

Build Process

The docs build process automatically handling the following steps via generate:

  1. Downloads required protoc plugins.
  2. Generates gRPC documentation from proto files.
  3. Generates API documentation from OpenAPI specs.
  4. Generates index files for directory structures.

Style Guide

  • Variables: Use environment variables in code snippets where possible.
  • Embedded Content: Use _filename.mdx for content embedded in other pages (not indexed individually).
  • Code Embedding: Use the file property in code blocks to embed code from the repo.
  • Voice: Use active voice and sentence case for titles.

Refer to the Google Developer Style Guide for general guidelines.

Adding Content

All documentation content is located in the content directory. Note that the system strictly accepts only .mdx files.

To add a new page:

  1. Create a .mdx file in the appropriate subdirectory of content.
  2. Register the new page in the sidebar settings at lib/sidebar-data.ts to make it accessible in the navigation.

Pull Requests

Use docs(<scope>): <short summary> for PR titles. Pass quality checks before submitting:

pnpm nx run @zitadel/docs:build
pnpm nx run @zitadel/docs:check:links

You can also run specific steps individually:

  • pnpm fetch:remote-content
  • pnpm generate:api-reference