Revoke an API key
Revokes a key by id — stamps its revoked_at and deletes the hot-path KV entry so the token stops authenticating immediately. Takes no body.
Revokes a key by id — stamps its revoked_at and deletes the hot-path KV entry so the token stops authenticating immediately. Takes no body.
Idempotent: revoking an already-revoked key is a no-op and returns the same { id, revoked: true }. Returns 404 if no such key exists in the project.
Rotate a leaked or stale credential — mint the replacement, then revoke the old key.
Authorization
bearerSdkKey Pass an admin SDK key as Authorization: Bearer sdk_admin_…. Mint via POST /api/admin/keys with type: "admin".
In: header
Path Parameters
Stable opaque key id (UUID) returned by create / list.
1 <= length <= 128Header Parameters
Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://shipeasy.ai/api/admin/keys/string/revoke"{
"id": "3f2a9b1c-7d4e-4a8f-9c2b-1e5d6f7a8b90",
"revoked": true
}{
"error": "Malformed request (bad JSON, missing project scope).",
"code": "BAD_REQUEST"
}{
"error": "Missing or invalid admin SDK key.",
"code": "UNAUTHORIZED"
}{
"error": "Key is valid but not allowed to act on this project.",
"code": "FORBIDDEN"
}{
"error": "The resource does not exist or is not visible to the caller.",
"code": "NOT_FOUND"
}{
"error": "A resource with this name already exists in the project.",
"code": "ALREADY_EXISTS"
}{
"error": "The request body failed structural (schema) validation.",
"code": "VALIDATION"
}