---
title: "Invalidates a user access token"
method: POST
path: "/_matrix/client/v3/logout"
tags: ["Session management"]
---

# Invalidates a user access token

`POST /_matrix/client/v3/logout`

## Request

- Base URL: `https://matrix.org`
- URL: `https://matrix.org/_matrix/client/v3/logout`
- Auth: one of:
  - API key in query parameter `access_token`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/matrix/apis/matrix-client-server-api/docs/_matrix/client/v3/logout/post.ts> (a function with typed inputs; its response is checked against the schema)

Invalidates an existing access token, so that it can no longer be used for
authorisation. The device associated with the access token is also deleted.
[Device keys](https://spec.matrix.org/v1.19/client-server-api/#device-keys) for the device are deleted alongside the device.

## Response `200`

The access token used in the request was successfully invalidated.

- object

---

[API](https://skmtc.dev/matrix/apis/matrix-client-server-api.md) - [All operations](https://skmtc.dev/matrix/apis/matrix-client-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/matrix/apis/matrix-client-server-api/revisions/c7fe4072c681?raw)
