---
title: "Revoke an API key"
method: DELETE
path: "/v2/account/apikeys/{keyId}"
tags: ["Account"]
---

# Revoke an API key

`DELETE /v2/account/apikeys/{keyId}`

Revokes the key and invalidates the account cache the three services authenticate against, so the credential stops working immediately instead of surviving the cache TTL.

Revoking removes the credential; it does **not** undo what the credential did. Workspace members it added stay members — the panel surfaces that separately when the revoked key held `workspaces:manage`.

A response other than 200 means the key may still authenticate: retry until it returns 200.

Session token only — an API key cannot revoke API keys, not even itself.

## Path parameters

- `keyId` string, required

## Response `200`

Key revoked and cache invalidated.

- object
  - `status` 'success', required
  - `response` object, required
    - `id` string, required

## Other responses

- `401` — This endpoint requires a session token (JWT). API keys are not accepted.
- `404` — No key with that id on the account.
- `429` — The endpoint enforces its own rate limit and the caller hit the cooldown.
- `500` — The key was removed from the database but the cache invalidation failed — retry.

---

[API](https://skmtc.dev/squarecloud/apis/square-cloud-api.md) · [All operations](https://skmtc.dev/squarecloud/apis/square-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/squarecloud/square-cloud-api/revisions/54b7733a6b95/schema)
