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

# Refresh Token

> Generate a new JWT token

<Note>This endpoint requires authentication. The current token must still be valid.</Note>

## Response

<ResponseField name="accessToken" type="string">
  New JWT token
</ResponseField>

<ResponseField name="expiresIn" type="number">
  Token expiration time in seconds
</ResponseField>

<ResponseField name="user" type="object">
  User information
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.hitler.app/api/auth/refresh" \
    -H "Authorization: Bearer YOUR_CURRENT_TOKEN"
  ```

  ```typescript TypeScript theme={null}
  const response = await api.refreshToken();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "expiresIn": 604800,
    "user": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "email": "user@company.com",
      "name": "John Doe",
      "role": "employee",
      "organizationId": "456e7890-e12b-34d5-a678-426614174000"
    }
  }
  ```

  ```json 401 theme={null}
  {
    "statusCode": 401,
    "message": "Unauthorized",
    "error": "Unauthorized"
  }
  ```
</ResponseExample>
