---
title: "Revoke an org API key"
method: POST
path: "/orgs/{orgID}/api-keys/{keyID}/revoke"
tags: ["Users and API Keys"]
---

# Revoke an org API key

`POST /orgs/{orgID}/api-keys/{keyID}/revoke`

## Request

- Base URL: `https://api.omnara.com/v1`
- URL: `https://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/revoke`
- Auth: API key in cookie `__Host-omnara_session` and API key in header `X-Omnara-Csrf`

Terminally revokes the key, removes its org and project roles, and cancels pending invitations it sent. Idempotent.

## Path parameters

- `orgID` string, required
- `keyID` string, required

## Response `200`

The revoked org API key.

- OrgAPIKey
  - `id` string, required
  - `org_id` string, required
  - `name` string, required: Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.
  - `token_id` string, required: Stable non-secret display identifier. It is not embedded in the bearer token.
  - `org_role` string, required: The key's org role (admin or member). Empty for revoked keys.
  - `created_by_user_id` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `last_used_at` string, date-time, nullable, required
  - `revoked_at` string, date-time, nullable, required

## Other responses

- `400`: The request was invalid.
- `401`: Authentication is required or invalid.
- `403`: The authenticated principal is not authorized.
- `404`: The requested resource was not found or is not visible.
- `503`: The service dependency required to satisfy the request is unavailable.
- `4XX`: Any other client error. The body carries the shared Error envelope restricted to client error codes; statuses with a dedicated response above are documented precisely.
- `5XX`: Any other server error. The body carries the shared Error envelope restricted to server error codes.

## Changes

- **2026-10-05** `3d9e2cf46e07`: 136 info
  - added the optional property `current_digest` to the response with the `400` status
  - added the optional property `current_digest` to the response with the `401` status
  - added the optional property `current_digest` to the response with the `403` status
  - added the optional property `current_digest` to the response with the `404` status
  - …132 more
  - …this revision’s changelog is incomplete
- **2026-09-28** `acddeb8fc6a5`: 6 warning, 6 info
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `400`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `401`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `403`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `404`
  - …8 more
- **2026-09-01** `e4978b047d7a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnara/apis/omnara-api-2/changes/orgs/:orgID/api-keys/:keyID/revoke/post.md)

---

[API](https://skmtc.dev/omnara/apis/omnara-api-2.md) - [All operations](https://skmtc.dev/omnara/apis/omnara-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/omnara/apis/omnara-api-2/revisions/343aebb1dff1?raw)
