Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview

Revoke an API key

Ends an API key at once. Requests that send it are refused from then on.

DELETE/_luna/tokens/{id}
Authorization
AuthorizationBearer token · headerrequired

An account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.

Scopes:tokens:write
Path parameters
idstringrequired

The key's id: 16 hex characters.

Responses
200

Whether a key was revoked.

revokedbooleanrequired

Whether there was a key with this id to revoke.

default

The request failed. The status says how and error.message says why.

errorErrorDetailrequired
Show properties
codestring | null

A code for programs to branch on, when the error has one.

messagestringrequired

What went wrong, in a sentence a person can read.

Try it
Server
Authorization
Parameters
Request
curl -X DELETE 'https://luna.example.com/_luna/tokens/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "revoked": true
}

Was this page helpful?