> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuro-tech.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Refresh

> Refresh a JWT without logging in again

## Overview

Use this endpoint to obtain a new JWT before the current one expires. If refresh
fails or the token is expired, log in again.

## HTTP request

`POST /Agent/Account/Refresh`

## Authentication

Requires a valid JWT bearer token.

## Request body

```json theme={null}
{
  "seconds": 3600
}
```

| Field     | Type   | Required | Description                                                 |
| --------- | ------ | -------- | ----------------------------------------------------------- |
| `seconds` | number | yes      | Requested lifetime for the new JWT (`0 < seconds <= 3600`). |

## Response

```json theme={null}
{
  "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires": "2024-08-02T12:22:11Z"
}
```

| Field     | Type   | Description               |
| --------- | ------ | ------------------------- |
| `jwt`     | string | New JWT bearer token.     |
| `expires` | string | JWT expiration timestamp. |

## Error handling

If the current JWT is invalid or expired, you must log in again.

## Next steps

* Log out when done: [Logout](/manual-api-reference/accounts/logout)
