---
title: "Logout"
method: POST
path: "/api/v1/auth/logout"
tags: ["Authentication"]
---

# Logout

`POST /api/v1/auth/logout`

## Request

- Base URL: `https://app.aimrank.io` (the document declares no server; this is the origin it was published from)
- URL: `https://app.aimrank.io/api/v1/auth/logout`
- Auth: none declared

Logout — blacklist tokens and clear HttpOnly cookies.

If the blacklist write fails (e.g., Redis is down), we return 503
instead of pretending logout succeeded. The frontend should treat
the pre-logout state as still-valid and retry. Silent swallowing
here would mean a stolen token stays usable until JWT expiry
(up to 24h) even though the user thinks they're logged out.

## Request body

- LogoutRequest
  - `refresh_token` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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