Revoke an API token
/api-tokens/{tokenId}Use this to stop a token working at once, for example after a leak. Any token can revoke itself without a scope; revoking another token needs api_tokens:write. Revoking a revoked token answers it unchanged. New tokens are made only in the panel.
- Token
- Bearer API token: cxk_live_ followed by 46 letters and digits
- Scope
api_tokens:write- Header
Authorization: Bearer $CLOUDUXE_API_KEY
How tokens and scopes work: Authentication and scopes.
tokenIdstring (uuid)RequiredThe token's id.
Clouduxe-VersionstringOptionalThe API version to use, such as 2026-12-01. Omit it to use your token's version.
pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$Idempotency-KeystringRequiredA unique key for this logical request, 1 to 128 characters of letters, digits, underscore, dot, colon or hyphen; a UUID is best. Retrying with the same key is safe: the change happens once and the retry gets the same answer. Keys are kept 48 hours.
pattern ^[A-Za-z0-9_.:-]{1,128}$
200OK The revoked token.
objectstringRequiredThe object's type. Always "api_token".
idstring (uuid)RequiredThe token's id.
namestringRequiredThe token's name.
prefixstringRequiredThe token's prefix: cxk_live_.
One ofcxk_live_lastFourstringRequiredThe token's last four characters, to tell tokens apart.
scopesarray of stringRequiredWhat the token may do.
apiVersionstringRequiredThe API version used when a request sends no Clouduxe-Version header.
ipAllowlistarray of stringRequiredAddresses or CIDR ranges the token may be used from. Empty means any address.
createdByobjectRequiredWho made it.
Show 2 child attributesHide 2 child attributes
personIdstring (uuid)RequiredThe person's id.
namestring or nullRequiredTheir name, or null.
createdAtstring (date-time)RequiredWhen it was made.
expiresAtstring (date-time) or nullRequiredWhen it expires, or null for never. A token holding any elevated scope (marked elevated at https://docs.clouduxe.com/api/authentication#scopes) always expires, at most 365 days after creation.
lastUsedAtstring (date-time) or nullRequiredWhen it was last used (updated at most once a minute), or null.
lastUsedIpstring or nullRequiredThe address it was last used from, or null.
revokedAtstring (date-time) or nullRequiredWhen it was revoked, or null.
revokedReasonstring or nullRequiredWhy: user, leaked (reported by secret scanning), member_removed, person_disabled, account_closed or expired.
One ofuserleakedmember_removedperson_disabledaccount_closedexpiredlivemodebooleanRequiredTrue for objects of your live account.
Every response
- 200OKThe revoked token.
- 400Bad requestThe request is not valid. Codes: version_invalid, idempotency_key_required, idempotency_key_invalid.
- 401UnauthorizedAuthentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- 403ForbiddenThe token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- 404Not foundNot found. Codes: not_found.
- 409ConflictThe request conflicts with the object's current state. Codes: idempotency_in_progress.
- 422UnprocessableThe request is well formed but cannot be carried out. Codes: idempotency_mismatch.
- 429Too many requestsA rate limit was reached. Codes: rate_limited.
- 500Server errorUnexpected error. Codes: internal_error.
- 503UnavailableTemporarily unavailable. Codes: unavailable, outcome_unknown, limits_unavailable.