Skip to content

POST /auth/login

Authenticate existing users with email and password (password required). Returns a JWT for subsequent authenticated requests.

POST /v1/public/projects/:projectSlug/auth/login
FieldTypeRequiredDescription
emailstringUser’s email address
passwordstringUser’s password
turnstileTokenstringTurnstile token for captcha (if project uses it)
{
"email": "user@example.com",
"password": "SecurePassword123!"
}
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": "user-uuid-here",
"email": "user@example.com",
"name": "Jane Doe"
}
}

Store the token and send it in Authorization: Bearer <token> for protected endpoints like GET /auth/me.

Status CodeDescription
400Validation failed (invalid email/password format)
401Invalid email or password
403Account locked (too many failed attempts) or email not verified
429Too many login attempts (rate limited)
POSThttps://api.aerostack.dev/v1/public/projects/your-project/auth/login