Skip to content

Revoke one of your API tokens

DELETE
/auth/tokens/{id}

Revokes one of your API tokens. Use an id from GET /auth/tokens. From then on the token no longer works; a request that has already authenticated with it isn’t cancelled. Your other tokens and your sessions aren’t affected.

You can call this with the session cookie, another token or the token you’re revoking. If you revoke the token you’re using, later requests that rely on it alone get 401; a request that also sends a valid session cookie is still signed in. As long as the request is signed in, you get 404 if the token isn’t yours, doesn’t exist or is already revoked, so revoking the same token a second time gets 404. You can’t revoke someone else’s token here, even as an administrator. An expired token can still be revoked.

Revoking a token isn’t recorded in the audit log.

id
required
string format: uuid

The token’s id, from GET /auth/tokens.

The token is revoked.

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Resource not found

object
error
required

Human-readable error summary

string
Example
the request could not be completed