Login
Obtains a Bearer token required for authenticated requests.
Bot Protection
This endpoint requires a valid Cloudflare Turnstile token when bot protection is enabled. See the Turnstile Integration Guide for frontend setup instructions.
HTTP Request
POST /api/v1/auth/login
| Parameter | Description |
|---|---|
email string | Email address (max 255 chars). Matched case-insensitively. |
password string | User's password |
turnstileToken string | Cloudflare Turnstile verification token. |
Response
200 OK
Returns the token together with the User Object of the account, so no extra Get Profile call is needed after login.
{
"data": {
"token": "3|4UgEk8lXwa1D6rbYO8fqMfKhgnwdRuSqZb4Woz083ad0785f",
"user": {
"email": "client@example.com",
"phone": null,
"role": "client",
"firstName": null,
"lastName": null,
"billingAddress": null,
"shippingAddress": null,
"bankAccount": null,
"company": null,
"regions": null,
"registrationNumber": null,
"emailVerified": true,
"newsletterSubscribed": false,
"testimonyAlerts": null,
"onboardingStatus": null
}
}
}The token is a Bearer token that must be included in the Authorization header for all authenticated requests:
Authorization: Bearer 3|4UgEk8lXwa1D6rbYO8fqMfKhgnwdRuSqZb4Woz083ad0785fError Handling
422 Unprocessable Content — the email/password combination is wrong. The error is reported on the email field and is identical for an unknown address and a wrong password:
{
"message": "Prihlasovacie údaje nie sú správne.",
"errors": {
"email": [
"Prihlasovacie údaje nie sú správne."
]
}
}422 Unprocessable Content is also returned when email or password is missing or malformed, or the Turnstile token is invalid.
429 Too Many Requests — more than 5 attempts per minute from one IP address.
This endpoint never answers 401 Unauthorized.