---
title: "Revoke one of the user's CLI tokens"
description: "Session-only — the dashboard Devices page revokes a session; any wbl_* bearer is rejected with INSUFFICIENT_PRIVILEGE."
api_method: POST
api_path: "/v1/users/me/cli-tokens/{tokenId}/revoke"
canonical_url: https://wiblo.app/docs/developers/api/cli-tokens/revoke-my-cli-token
last_updated: 2026-07-28T17:31:44+02:00
md_url: https://wiblo.app/docs/developers/api/cli-tokens/revoke-my-cli-token.md
---

# Revoke one of the user's CLI tokens

`POST /v1/users/me/cli-tokens/{tokenId}/revoke`

Session-only — the dashboard Devices page revokes a session; any `wbl_*` bearer is rejected with `INSUFFICIENT_PRIVILEGE`. Sets `revoked_at` on the user's own token. Per-user rate-limited at 30/60s.

## Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `tokenId` | `string` | Yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `reason` | `string` | No | Defaults to `"user_revoked"`. |

## Request

**curl**

```bash
curl https://api.wiblo.app/v1/users/me/cli-tokens/{tokenId}/revoke \
  -X POST \
  -H "Authorization: Bearer $WIBLO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "..."
}'
```

**TypeScript**

```ts
import { createSdk, revokeMyCliToken } from "@workspace/sdk"

const sdk = createSdk({ baseUrl: "https://api.wiblo.app" })

const { data, error } = await revokeMyCliToken({
  client: sdk,
  path: { tokenId: "..." },
  body: {
    "reason": "..."
  },
})
```

## Responses

**`204`** — The token is revoked.

**`400`** — Body failed Zod validation (`VALIDATION_FAILED`). Returns `ApiErrorEnvelope`.

**`401`** — No valid Supabase session cookie was present. Returns `ApiErrorEnvelope`.

**`403`** — A `wbl_*` bearer was presented to a session-only route (`INSUFFICIENT_PRIVILEGE`). Returns `ApiErrorEnvelope`.

**`404`** — No such CLI token belongs to the user (`CLI_TOKEN_NOT_FOUND`). Returns `ApiErrorEnvelope`.

**`422`** — Path param failed UUID validation (`INVALID_PARAMS`). Returns `ApiErrorEnvelope`.

**`429`** — Rate limit exceeded. The body's `error.code` is `RATE_LIMITED` and `error.details.retry_after` is the same number of seconds as the `Retry-After` header. Returns `ApiErrorEnvelope`.
