---
title: "Revoke an API key"
method: PUT
path: "/v2/api-keys/{api_key_id}/revoke"
tags: ["API Keys"]
---

# Revoke an API key

`PUT /v2/api-keys/{api_key_id}/revoke`

Revoke an API key by its ID. The key will immediately stop working for authentication. Revoking an
already-revoked key is a no-op and still returns `204`.

**Authorization:**
- **User keys:** The key's creator or an account admin may revoke the key.
- **Service keys:** Account admins and space admins in all of the key's bound spaces may
  revoke the key regardless of who created it. All other callers must have the
  `SERVICE_KEY_REVOKE` permission in every bound space and must be the key's creator.
  Callers without read access to the key receive `404` to prevent key-ID enumeration.

  <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>

## Path parameters

- `api_key_id` string, required — A universally unique identifier (base64-encoded opaque string).

## Response `204`

API key successfully revoked

## Other responses

- `400` — Invalid request
- `401` — Authentication is required
- `403` — Insufficient permissions to access this resource
- `404` — Not found
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/arize-ai/apis/arize-rest-api.md) · [All operations](https://skmtc.net/arize-ai/apis/arize-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/arize-ai/arize-rest-api/versions/2ce448f1de13/schema)
