Skip to main content

Keys API (/1/keys)

Manages programmatic access tokens (Zitadel PATs) within a project scope.

GET /1/keys​

  • Description: Lists active API key names in the project.
  • Roles: admin.

POST /1/keys​

  • Description: Registers a new project machine user in Zitadel, assigns the selected role (admin, developer, viewer), and requests a clear-text Personal Access Token (PAT).
  • Roles: admin.

Request body:

{
"name": "ci-runner-token",
"role": "developer"
}

Response:

{
"id": "3779552961...",
"name": "ci-runner-token",
"role": "developer",
"value": "eyJhbGciOiJSUzI1NiIsImt..."
}
warning

The clear-text PAT value is returned only once at creation. Store it in your secret manager immediately; it cannot be retrieved again.

DELETE /1/keys/{id}​

  • Description: Deletes an API key machine user in Zitadel, immediately revoking access.
  • Roles: admin.