AdminsLogin

login

POST
/api/v1/login

Authenticate an administrator with email and password. A successful login creates the browser session cookies, including the csrftoken value used with the X-CSRFToken header on later API requests.

When 2FA is enabled, either include the two_factor code in this request or submit the first factor here and complete the login with Two Factor.

Request Body

application/json

Login request using email/password and an optional two-factor code

email*string

Administrator email address used to log in

password*string

Administrator password used to log in

two_factor?string

Optional two-factor authentication code for the login request

Response Body

curl -X POST "https://example.com/api/v1/login" \  -H "Content-Type: application/json" \  -d '{    "email": "test@mistsys.com",    "password": "foryoureyesonly",    "two_factor": "123456"  }'

{  "email": "test@mistsys.com",  "two_factor_passed": false,  "two_factor_required": true}