---
title: "Logs out a user."
method: POST
path: "/logout"
tags: ["auth"]
---

# Logs out a user.

`POST /logout`

## Query parameters

- `scope` 'global' | 'local' | 'others'

## Response `204`

No content returned on successful logout.

## Other responses

- `401` — HTTP Unauthorized response.

## Changes

- **2025-02-07** `4d0f1a6c1ad9` — 1 info
  - added the optional property `error_code` to the response with the `401` status
- **2023-12-13** `77f9aeb9339a` — 1 info
  - added the optional property `weak_password` to the response with the `401` status
- **2023-07-03** `5ed47f677cc9` — 1 info
  - added the new optional `query` request parameter `scope`
- **2023-02-01** `144a34ca6d74` — 3 warning
  - deleted the `query` request parameter `scope`
  - removed the optional property `error_code` from the response with the `401` status
  - removed the optional property `weak_password` from the response with the `401` status

[Change history](https://skmtc.dev/supabase/apis/supabase-auth-rest-api/changes/logout/post.md)

---

[API](https://skmtc.dev/supabase/apis/supabase-auth-rest-api.md) · [All operations](https://skmtc.dev/supabase/apis/supabase-auth-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/supabase/supabase-auth-rest-api/revisions/2e2a74a7459f/schema)
