---
title: Authenticate for the API
endpoint: POST /api/v1/authenticate
description: Authentication
---

`POST /api/v1/authenticate`

## Request

| Field | Type | Required | Example | Description |
| --- | --- | --- | --- | --- |
| `username` | string | optional | `johndoe` | Username to authenticate with. |
| `password` | string | optional | `kDWPe4qf$&mgM26&8hX` | Password belonging to the given username. |

## Responses

| Status | Meaning |
| --- | --- |
| 200 | Successfully authenticated. |
| 400 | A list of possible errors for this endpoint. |

| Field | Type | Required | Example | Description |
| --- | --- | --- | --- | --- |
| `token` | string | optional | `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c` | Authentication token. Use this to request resources requiring authentication. |
| `refreshToken` | string | optional | `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c` | Refresh token. Use this to request a new authentication token. |
