# Refresh JWT requests

```json metadata
{
  "title": "Refresh JWT requests",
  "description": "Refresh JW token requests",
  "categories": ["docs","operate","rs"],
  "tableOfContents": {"sections":[{"children":[{"id":"request-post-request","title":"Request {#post-request}"},{"id":"response-post-response","title":"Response {#post-response}"},{"id":"status-codes-post-status-codes","title":"Status codes {#post-status-codes}"}],"id":"get-a-new-authentication-token-post-refreshjwt","title":"Get a new authentication token {#post-refresh_jwt}"}]}

,
  "codeExamples": []
}
```
| Method | Path | Description |
|--------|------|-------------|
| [POST](#post-refresh_jwt) | `/v1/users/refresh_jwt` | Get a new authentication token |

## Get a new authentication token {#post-refresh_jwt}

    POST /v1/users/refresh_jwt

Generate a new JSON Web Token (JWT) for authentication.

Takes a valid token and returns the new token generated by the request.

### Request {#post-request} 

#### Example HTTP request

	POST /v1/users/refresh_jwt 

#### Request headers

| Key | Value | Description |
|-----|-------|-------------|
| Host | cnm.cluster.fqdn | Domain name |
| Authorization | JWT eyJ5bGciOiKIUzI1NiIsInR5cCI6IkpXVCJ9.<br></br>eyJpYXViOjE0NjU0NzU0ODYsInVpZFI1IjEiLCJ<br></br>leHAiOjE0NjU0Nz30OTZ9.2xYXumd1rDoE0e<br></br>dFzcLElMOHsshaqQk2HUNgdsUKxMU | Valid JSON Web Token (JWT) |

#### Request body

| Field | Type | Description |
|-------|------|-------------|
| ttl | integer | Time to live - The amount of time in seconds the token will be valid (optional) |

### Response {#post-response} 

Returns a JSON object that contains the generated access token.

#### Example JSON body

```json
 {
     "access_token": "eyJ5bGciOiKIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXViOjE0NjU0NzU0ODYsInVpZFI1IjEiLCJleHAiOjE0NjU0Nz30OTZ9.2xYXumd1rDoE0edFzcLElMOHsshaqQk2HUNgdsUKxMU"
 }
```



### Status codes {#post-status-codes} 

| Code | Description |
|------|-------------|
| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | A new token is given. |
| [401 Unauthorized](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2) | The token is invalid or password has expired. |

