> For the complete documentation index, see [llms.txt](https://fusionauth.io/docs/llms.txt)

# Logout a User

API documentation for the FusionAuth Logout a User API.

# Logout a User

The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the client and revoke the refresh token. This API does nothing if the request does not contain an access token or refresh token cookies.

The refresh token is only revoked if the request contains the `refresh_token` cookie or the `refreshToken` request parameter.

## Request

[!No Authentication Required](https://fusionauth.io/docs/apis/authentication.md#no-authentication-required)

Remove the access\_token and refresh\_token cookies if they exist on the client.

POST/api/logout

OpenAPI Spec

### Request Cookies

`access_token`Stringoptional

The access token cookie. When this cookie available in the request it will be deleted from the client.

`refresh_token`Stringoptional

The refresh token cookie. When this cookie available in the request it will be deleted from the client and revoked in FusionAuth.

#### Request Headers

`X-FusionAuth-TenantId`Stringoptional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon the request parameters or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See [Making an API request using a Tenant Id](https://fusionauth.io/docs/apis/authentication.md#making-an-api-request-using-a-tenant-id) for additional information.

### Request Body

`global`BooleanoptionalDefaults to false

When this value is set to `true`, revokes:

*   all of the refresh tokens issued to the owner of the provided refresh token
*   the FusionAuth SSO session

If no refresh token is provided on the request, no refresh tokens will be revoked.

`refreshToken`Stringoptional

The refresh token to revoke.

If provided, FusionAuth uses the token provided this parameter instead instead of the token provided in the `refresh_token` cookie.

## Response

This API does not return a JSON response body.

*Response Codes*

| Code | Description |
| --- | --- |
| 200 | The update was successful. |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. |