BillKit/Docs Console
API keys

Revoke API key

Revoke an API key so it stops working.

POST/v1/api_keys/{api_key_id}/revoke
Operation revoke_api_key · Scope api_keys:write · Spec snapshot 2026-09-13

Parameters

ParameterDescription
api_key_idstring · pathrequiredNo description in the spec.

Returns

Returns an ApiKeyResponse object.

Errors

Status Cause
401 Missing or invalid API key.
403 Key is missing the api_keys:write scope.
404 No such object, or it belongs to the other mode.
422 Validation Error
429 Rate limited. Back off and retry.
Request · curl
curl -X POST https://api.billkit.eu/v1/api_keys/ak_9XKp2vQ1/revoke \
  -H "Authorization: Bearer $BILLKIT_SECRET_KEY"
Response · 200 OK
{
  "created": 1789392000,
  "id": "ak_9XKp2vQ1",
  "label": "string",
  "last_used_at": 1789392000,
  "livemode": false,
  "object": "api_key",
  "prefix": "string",
  "revoked_at": 1789392000,
  "scopes": [
    "string"
  ],
  "secret": "string"
}