---
title: "Revoke one API key"
method: POST
path: "/v1/account/keys/{id}/revoke"
tags: ["Account"]
---

# Revoke one API key

`POST /v1/account/keys/{id}/revoke`

## Request

- Base URL: `https://api.galleyrender.com`
- URL: `https://api.galleyrender.com/v1/account/keys/{id}/revoke`
- Auth: HTTP bearer

Immediate and permanent: the next request carrying that key gets `authentication_error`. The id comes from `other_live_keys` on `POST /v1/account/keys`.

Revoking the account's **last** live key is refused with `invalid_request`. An account with no live key cannot mint one here, so that request is a lock-out rather than a cleanup: mint the replacement first.

## Path parameters

- `id` string, uuid, required

## Response `200`

Revoked.

- object
  - `object` 'api_key', required
  - `account` string
  - `id` string, uuid, required
  - `key_prefix` string
  - `revoked` true, required
  - `revoked_at` string, date-time
  - `effect` string
  - `live_keys_remaining` integer

## Other responses

- `400`: `invalid_request` — this is the only live key on the account.
- `401`: `authentication_error`.
- `404`: `not_found` — no live key with that id on this account.

---

[API](https://skmtc.dev/galleyrender/apis/galley-render-api.md) · [All operations](https://skmtc.dev/galleyrender/apis/galley-render-api/llms.txt) · [OpenAPI document](https://skmtc.dev/galleyrender/apis/galley-render-api/revisions/a85d68468cd2?raw)
