---
title: "Revoke an API key"
method: DELETE
path: "/credits/tenants/me/keys/{keyId}"
tags: ["Tenants"]
---

# Revoke an API key

`DELETE /credits/tenants/me/keys/{keyId}`

## Request

- Base URL: `https://api.paywithlocus.com/api`
- URL: `https://api.paywithlocus.com/api/credits/tenants/me/keys/{keyId}`
- Auth: HTTP bearer

Revokes one key immediately; it returns 401 on the next request. Use this as the final step of a rotation, after the new credential is confirmed working. Requires a workspace owner or admin with MFA step-up completed in the last ten minutes.

## Path parameters

- `keyId` string, uuid, required

## Headers

- `X-Locus-Step-Up` string, password

## Request body

- object
  - `reason` string: Recorded on the credential audit event.

## Response `204`

Revoked. The key is dead as of this response. Idempotent: revoking an already-revoked key returns 204 again without a second audit event.

## Other responses

- `400`: Invalid reason (over 200 characters, control characters, or not a string), or an unknown body field.
- `403`: STEP_UP_REQUIRED or INSUFFICIENT_SCOPE.
- `404`: No such key in this workspace (malformed ids included).

---

[API](https://skmtc.dev/paywithlocus/apis/locus-pro-api.md) - [All operations](https://skmtc.dev/paywithlocus/apis/locus-pro-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paywithlocus/apis/locus-pro-api/revisions/aab8fa5d6cef?raw)
