POST
/api/auth/login
Email / password login
Authenticates a user with email and password, returns a JWT session token.
curl -s -X POST "$BASE/api/auth/login" \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "secret"}'Request Body
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| string | Y | — | ||
| password | string | Y | — |
Response Example
{
"success": true,
"data": {
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": "u_abc123",
"email": "user@example.com"
}
}
}