EndpointsAuth

Revoke a personal access token

Revokes the token with the given ID. Idempotent: revoking an already-revoked token succeeds. PAT callers need `write` scope; revoking the token that authenticates the request itself additionally requires X-Routess-Confirm: true, since it locks the caller out.

DELETE
/auth/tokens/{id}

Authorization

headerAuthorizationBearer <token>

Personal access token for non-browser clients. Mint at Settings → API Tokens. Carries one of two scopes: read (list/get Routes, export GPX, profile) or write (read plus metadata-only mutations on owned routes and on preferences). Blocked from /admin/* and from DELETE /users/me. Destructive operations require X-Routess-Confirm: true and return 428 PRECONDITION_REQUIRED otherwise. See ADR-0022 and ADR-0023.

Path Parameters

id*number

Token ID

Header Parameters

X-Routess-Confirm?string

Required as true when a PAT revokes itself. Cookie sessions ignore this header.

Response Body

Token revoked

application/json
  1. response
success*boolean
curl -X DELETE 'https://api.routess.com/auth/tokens/0'
{  "success": true}