---
title: "Revoke a token"
method: POST
path: "/api/vega/token/revoke"
tags: ["Tokens"]
---

# Revoke a token

`POST /api/vega/token/revoke`

## Request

- Base URL: `https://getmyluna.app`
- URL: `https://getmyluna.app/api/vega/token/revoke`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `luna_session`

Immediately stops that token (and any assistant using it).

## Request body

- TokenRevokeRequest
  - `id` string, required: Token id from `GET /api/vega/tokens`.

## Response `200`

Success

- OkResponse
  - `ok` boolean

## Other responses

- `401`: Missing or invalid credentials
- `403`: `insufficient_scope`: the bearer token lacks the `write` scope
- `404`: Not Found
- `422`: Validation Error

---

[API](https://skmtc.dev/getmyluna/apis/luna-api.md) · [All operations](https://skmtc.dev/getmyluna/apis/luna-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getmyluna/apis/luna-api/revisions/ef7b359c9648?raw)
