---
title: "Logout a user account"
method: POST
path: "/api/accounts/logout/"
tags: ["accounts"]
---

# Logout a user account

`POST /api/accounts/logout/`

## Request

- Base URL: `https://docs.blindinsight.io` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.blindinsight.io/api/accounts/logout/`
- Auth: one of:
  - API key in cookie `sessionid`
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/blindinsight/apis/blind-insight-rest-api/docs/api/accounts/logout/post.ts> (a function with typed inputs; its response is checked against the schema)

Log out the currently authenticated user. This simply invalidates the JSON web
token used.

This is separate from the porcelain `blind logout` command which removes stored
credentials on the local machine.

The response will be a detail message indicating if the logout was successful.

**On the command line:**

```bash
blind accounts logout
```

## Request body

- Logout
  - `revoke_token` boolean

## Response `200`

- LogoutSuccessful
  - `detail` string

## Other responses

- `400`

---

[API](https://skmtc.dev/blindinsight/apis/blind-insight-rest-api.md) - [All operations](https://skmtc.dev/blindinsight/apis/blind-insight-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/blindinsight/apis/blind-insight-rest-api/revisions/0ac902401cea?raw)
