---
title: "Revoke Issued API Key"
method: POST
path: "/v2alpha1/admin/issuedApiKeys/{key_id}:revoke"
tags: ["ApiKeys"]
---

# Revoke Issued API Key

`POST /v2alpha1/admin/issuedApiKeys/{key_id}:revoke`

Immediately revokes an issued API key. Once revoked, the key can no longer
be used for authentication. This operation is irreversible. Revoked keys
are retained for audit purposes.

```http
POST /v2alpha1/admin/issuedApiKeys/01HQZX9VYQKJB8XQZQXQZQXQXQ:revoke
{
  "reason": "REVOCATION_REASON_KEY_COMPROMISE"
}
```

## Path parameters

- `key_id` string, required

## Request body

- AdminRevokeIssuedApiKeyBody — RevokeIssuedApiKeyRequest revokes an issued API key by its key_id.
  - `description` string — Optional free-text explanation. Only allowed when reason is PRIVILEGE_WITHDRAWN.
  - `reason` 'REVOCATION_REASON_UNSPECIFIED' | 'REVOCATION_REASON_KEY_COMPROMISE' | 'REVOCATION_REASON_AFFILIATION_CHANGED' | 'REVOCATION_REASON_SUPERSEDED' | 'REVOCATION_REASON_PRIVILEGE_WITHDRAWN' — RevocationReason provides structured revocation reasons inspired by RFC 5280. Used in both admin and self-revocation flows. - REVOCATION_REASON_UNSPECIFIED: Default zero value. Use a specific reason; UNSPECIFIED is rejected by admin and self-revocation endpoints. - REVOCATION_REASON_KEY_COMPROMISE: The key was leaked or believed to be in the hands of an unauthorized party. - REVOCATION_REASON_AFFILIATION_CHANGED: The owning actor's relationship with the issuer changed (e.g., role change, departure). - REVOCATION_REASON_SUPERSEDED: A new key has replaced this one as part of a rotation. - REVOCATION_REASON_PRIVILEGE_WITHDRAWN: Admin-only. The actor's privilege to use this key was withdrawn by an operator. Self-revocation requests using this reason are rejected with InvalidArgument. Pair with `description` on the admin revoke requests to record the operator-supplied justification.

## Response `200`

A successful response.

- object

## Other responses

- `204` — API key revoked successfully.
- `default` — An unexpected error response.

---

[API](https://skmtc.net/ory/apis/ory-talos-api.md) · [All operations](https://skmtc.net/ory/apis/ory-talos-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ory/ory-talos-api/versions/faeb5ce56780/schema)
