---
search:
  tags:
    - API Keys
    - DELETE
seo:
  description: >-
    Soft-deletes an API key. The key stops appearing in list results and is
    rejected on its… Reference for the DELETE /api_keys/{id} endpoint in the
    REST API API.
sidebar:
  badge: DELETE
  label: Revoke an API Key
title: Revoke an API Key
type: openapi-operation
---
Soft-deletes an API key. The key stops appearing in list results and is rejected on its very next authenticated request. Revocation is permanent — a revoked key can never be reinstated. A key may always revoke itself without the keys:manage scope; revoking any other key requires it.

### Endpoint

- Method and path: `DELETE /api_keys/{id}`
- Operation ID: `revokeAPIKey`
- API reference: [DELETE /api_keys/{id}](/api-reference/api-keys/revokeapikey)

#### Authorization

- Accepted credentials: `UDX-Access-Key` header and `UDX-Access-Timestamp` header and `UDX-Access-Signature` header; or Bearer token in `Authorization`
- Details: [Authentication](/authentication)

#### Parameters

- `UDX-Version` (`header`) — Dated API version (YYYY-MM-DD). Omit to use the oldest supported version. An unknown version returns `400`.
- `UDX-Idempotency-Key` (`header`) — Optional client-generated key that makes a mutation safe to retry. Reuse it only for a byte-identical retry. When present, it is included in the request signature; omitting it disables UDX idempotency for that request.
- `id` (`path`, required) — The public identifier of the API key to revoke.

#### Responses

- `204` — The key was revoked. No body is returned.
- `401` — No valid credential was provided.
- `403` — The credential lacks the `keys:manage` scope.
- `404` — The API key doesn't exist or doesn't belong to the caller, or was already revoked.
- `409` — This key is still in use or its response cannot be replayed. The mutation may have run; check `detail` before retrying.
- `422` — This key belongs to a different request.
- `429` — The Member's request rate is exhausted. Wait for `Retry-After`.
- `500` — Something went wrong on UDX's side.
- `503` — Request admission is unavailable. Retry later.
