Revoke every CLI token on the account
Revokes every cli_tokens row owned by the calling user — not just the
one making this request. Idempotent: a call with nothing left to
revoke returns { "revoked": 0 }.
Takes either credential type deliberately, for two different jobs:
a Clerk dashboard session uses it to evict a compromised CLI fleet; a
pcli_ token uses it to self-destruct along with its siblings (the
portal logout --all case) — this is safe because the route is
destructive-only, it cannot mint a credential, so a leaked token
gains no new capability by being allowed to call it.
Responses
- application/json
- application/json
Request Example for delete/v1/cli-tokens
curl https://api.useportal.co/v1/cli-tokens \
--request DELETE \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"revoked": 3
}