Authentication
Log in
POST
/api/auth/loginAuthenticates a user with a username and password. Users with two-factor authentication receive a short-lived partial token to complete sign-in.
Request body
| Name | Type | Description |
|---|---|---|
| passwordrequired | string | Umami password. |
| usernamerequired | string | Umami username. |
Example request
Responses
200Authenticated successfully.
| Name | Type | Description |
|---|---|---|
| anyOf | anyOf | |
200 example
400Bad request.
| Name | Type | Description |
|---|---|---|
| errorrequired | object | Error details returned when the operation fails. |
400 example
401Unauthorized.
| Name | Type | Description |
|---|---|---|
| errorrequired | object | Error details returned when the operation fails. |
401 example
503Service unavailable.
| Name | Type | Description |
|---|---|---|
| errorrequired | object | Error details returned when the operation fails. |
503 example
Code samples
cURL