API ReferenceAuthentication APIPOST /login

POST /auth/login

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

Password sign-in: For passwordless (no password field), use OTP Send + OTP Verify instead.

Email verification: If your project requires email verification, users must verify their email before logging in. Otherwise they receive emailNotVerified: true with status 403.

Endpoint

POST /api/v1/public/projects/:projectSlug/auth/login

Request Body

FieldTypeRequiredDescription
emailstringUser’s email address
passwordstringUser’s password
turnstileTokenstringTurnstile token for captcha (if project uses it)

Example Request Body

{
  "email": "[email protected]",
  "password": "SecurePassword123!"
}

Response

Success (200 OK)

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": "user-uuid-here",
    "email": "[email protected]",
    "name": "Jane Doe"
  }
}

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

Error Responses

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)

Try It Now

POSThttps://api.aerocall.app/api/v1/public/projects/your-project/auth/login