---
title: "Logout (revoke refresh token)"
method: POST
path: "/auth/logout"
tags: ["Authentication"]
---

# Logout (revoke refresh token)

`POST /auth/logout`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/auth/logout`
- Auth: HTTP bearer

Invalidate a refresh token. Requires an anon key.

Send `refresh_token` for the default flow. An eligible cookie-mode
browser request may instead send `session_mode: cookie` with an empty
token; logout remains idempotent when the cookie is missing or expired.

## Headers

- `X-Volcano-Proxy-Authorization` string
- `X-Volcano-Client-IP` string

## Request body

- object
  - `refresh_token` string
  - `session_mode` 'cookie'

## Response `204`

Logged out successfully

## Other responses

- `401`: Missing, invalid, or revoked anon key; or invalid, repeated, or under-scoped auth proxy metadata

## Changes

- **2026-10-23** `5113707385cc`: 3 info
  - added the new optional `header` request parameter `X-Volcano-Client-IP`
  - added the new optional `header` request parameter `X-Volcano-Proxy-Authorization`
  - added the non-success response with the status `401`
- **2026-08-27** `bb44e98aba2e`: 3 info
  - added the new optional request property `session_mode`
  - request body became optional
  - the request property `refresh_token` became optional

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/auth/logout/post.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
