---
search:
  tags:
    - Auth
    - POST
seo:
  description: >-
    Sign in with a password. Reference for the POST /auth/login endpoint in the
    piecemeal API.
sidebar:
  label: Sign in with a password
  badge: POST
title: Sign in with a password
type: openapi-operation
---
`POST /auth/login`

**Request body** (`application/json`, required)

- `password` (string, required)
- `username` (string, required)

Request body example:

```json
{
  "password": "string",
  "username": "string"
}
```

**Responses**

- `200` — OK
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Entity
- `429` — Too Many Requests
- `500` — Internal Server Error

Response example, 200:

```json
{
  "apiKeyId": 0,
  "apiKeyName": "string",
  "isAdmin": true,
  "method": "string",
  "name": "string",
  "scope": "string",
  "sessionKind": "string",
  "userId": 0,
  "username": "string"
}
```
