> For the complete documentation index, see [llms.txt](https://requestmechanic.gitbook.io/request-mechanic-api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://requestmechanic.gitbook.io/request-mechanic-api-documentation/user/user-logout.md).

# User Logout

Use the `POST /user/logout/` endpoint to log out users by invalidating their refresh token.

***

#### Parameters

| **Name** | **Type** | **Location** | **Required** | **Description**                                |
| -------- | -------- | ------------ | ------------ | ---------------------------------------------- |
| `data`   | Object   | Body         | Yes          | The request body containing the refresh token. |

***

#### Request Body

| **Field** | **Type** | **Description**                                                     |
| --------- | -------- | ------------------------------------------------------------------- |
| `refresh` | String   | The refresh token to invalidate. Must be at least 1 character long. |

**Example Request Body**

```json
{
  "refresh": "string"
}
```

***

#### Responses

| **Code** | **Description**            |
| -------- | -------------------------- |
| 201      | The logout was successful. |

**Example Response Body**

```json
{
  "refresh": "string"
}
```
