---
title: "Revoke Api Key"
method: POST
path: "/v1/api-keys/{api_key_id}/revoke"
tags: ["API Keys"]
---

# Revoke Api Key

`POST /v1/api-keys/{api_key_id}/revoke`

## Request

- Base URL: `https://api.fettle.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.fettle.sh/v1/api-keys/{api_key_id}/revoke`
- Auth: API key in header `Authorization`

Revoke an API key immediately.

Revocation is permanent and takes effect right away, including any
secret from a rotation still inside its grace window.

## Path parameters

- `api_key_id` string, uuid, required

## Headers

- `X-Organization-Id` string, uuid, nullable

## Response `200`

Successful Response

- ApiKeyRead: Key metadata. Never carries the secret.
  - `id` string, uuid, required
  - `name` string, required
  - `prefix` string, required
  - `scopes` ApiScope[], required
  - `status` 'ACTIVE' | 'REVOKED' | 'EXPIRED', required: Derived lifecycle state of a key. Never stored — see ``ApiKeyService.get_status``.
  - `allowed_cidrs` string[], nullable, required
  - `expires_at` string, date-time, nullable, required
  - `revoked_at` string, date-time, nullable, required
  - `last_used_at` string, date-time, nullable, required
  - `rotation_grace_expires_at` string, date-time, nullable, required
  - `created_by_user_id` string, uuid, required
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fettle/apis/fettle-sh.md) · [All operations](https://skmtc.dev/fettle/apis/fettle-sh/llms.txt) · [OpenAPI document](https://skmtc.dev/fettle/apis/fettle-sh/revisions/f32c8a18606f?raw)
