Skip to content

Revoke Token

DELETE
/tokens/{token_id}
curl --request DELETE \
--url https://example.com/tokens/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0

Revoke a token (audited as token.revoke; DESIGN decision 75).

Any token may revoke itself. A session (a signed-in person) may revoke every token of its own user, and an admin-scoped token any token. An agent token without admin scope can revoke only itself: any other id gets the same 404 as an unknown one, so the answer reveals nothing.

token_id
required
Token Id
string format: uuid

Successful Response

Media typeapplication/json
Response Revoke Token Tokens Token Id Delete
object
key
additional properties
string

Example generated

{
"additionalProperty": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Example generated

{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}