---
title: "Revoke API Key"
method: POST
path: "/keys/{key_id}/revoke"
tags: ["Keys"]
---

# Revoke API Key

`POST /keys/{key_id}/revoke`

## Request

- Base URL: `https://api.fal.ai/v1`
- URL: `https://api.fal.ai/v1/keys/{key_id}/revoke`
- Auth: API key in header `Authorization`

Revokes an API key by its ID, so it can no longer be used. This action is irreversible.

The key stops working immediately and drops out of `GET /v1/keys`, but the
record is retained with when it was revoked and by whom.

**Requirements:**
- Key must belong to the authenticated user's workspace

**Key Features:**
- Permanently revoke API key access while retaining the audit record
- Idempotent operation (safe to retry)
- Optional Idempotency-Key header for safe retries

**Important:**
- This action cannot be undone
- Any applications using this key will immediately lose access
- Returns 204 even if the key doesn't exist or is already revoked

**Common Use Cases:**
- Revoke compromised keys
- Clean up unused keys
- Implement key rotation (revoke old, create new)
- Offboard team members

**Required permissions:** `auth:keys:write`. Key presets that include them: `FULL`. See [key permissions](https://fal.ai/docs/documentation/model-apis/authentication/key-based#permissions).

## Path parameters

- `key_id` string, required: Unique identifier of the API key to revoke

## Headers

- `Idempotency-Key` string: Optional idempotency key for safe request retries

## Response `204`

API key revoked successfully (or already revoked)

## Other responses

- `401`: Authentication required
- `403`: Access denied
- `429`: Rate limit exceeded
- `500`: Internal server error

## Changes

- **2026-10-13** `c87cd6025a16`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fal/apis/platform-apis/changes/keys/:key_id/revoke/post.md)

---

[API](https://skmtc.dev/fal/apis/platform-apis.md) - [All operations](https://skmtc.dev/fal/apis/platform-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/fal/apis/platform-apis/revisions/3b3b61bedf06?raw)
