> 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/refresh-access-token.md).

# Refresh Access Token

The `POST /user/token/refresh/` endpoint is used to refresh an expired JSON Web Token (JWT). It takes a valid refresh token and returns a new access token if the refresh token is valid.

***

#### Parameters

| **Name** | **Description**                               |
| -------- | --------------------------------------------- |
| `data`   | *Object (body)* - Contains the refresh token. |

**Request Body**

| **Field** | **Type** | **Description**                                                                           |
| --------- | -------- | ----------------------------------------------------------------------------------------- |
| `refresh` | String   | The refresh token used to request a new access token. This must be a valid refresh token. |

**Example Request Body:**

```json
{
  "refresh": "your_refresh_token_here"
}
```

***

#### Responses

| **Code** | **Description**                           |
| -------- | ----------------------------------------- |
| `201`    | Successfully returned a new access token. |

**Response Body**

| **Field** | **Type** | **Description**                                         |
| --------- | -------- | ------------------------------------------------------- |
| `refresh` | String   | The original refresh token.                             |
| `access`  | String   | The newly issued access token. This token is read-only. |

**Example Response Body:**

```json
{
  "refresh": "your_refresh_token_here",
  "access": "new_access_token_here"
}
```
