---
title: "Log out"
method: POST
path: "/v1/auth/logout"
tags: ["Auth"]
---

# Log out

`POST /v1/auth/logout`

## Request

- Base URL: `https://api.naturali.ai`
- URL: `https://api.naturali.ai/v1/auth/logout`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.naturali.ai/authorize`, token URL `https://api.naturali.ai/token`, scopes: `mcp:access`)

Revokes the current refresh token (and its rotation family) and clears the `refresh_token` cookie. Pass `all: true` to revoke every active session for the user.

## Request body

- LogoutRequest
  - `refresh_token` string: The refresh token to revoke; defaults to the current session's.
  - `all` boolean: Revoke every active session for the user.

## Response `204`

Session(s) revoked.

## Other responses

- `401`: Missing or invalid credentials.

---

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