Skip to content

Log in with username and password

POST
/auth/login
curl --request POST \
--url https://your-server.example/api/auth/login \
--header 'Content-Type: application/json' \
--data '{ "username": "example", "password": "example" }'

Validates credentials and sets the session cookie. Subject to per-IP rate limiting and per-user/per-IP lockout.

Media typeapplication/json
object
username
required
string
password
required
string

Example generated

{
"username": "example",
"password": "example"
}

Login succeeded; session cookie set.

Media typeapplication/json
object
username
string
role
string

Example generated

{
"username": "example",
"role": "example"
}
Set-Cookie
string

HttpOnly session cookie.

Invalid request.

Media typetext/plain
string

Missing or invalid credentials.

Media typetext/plain
string

Rate limited or locked out.

Media typetext/plain
string