Auth

POST /login

Authenticate with email and password to receive a JWT token.

Request body

Required.

application/json

  • email string (email) · required
  • name string — Optional name for the created token. Defaults to "API Login".
  • password string · required
{
    "email": "user@example.com",
    "name": "Mobile App",
    "password": "password"
}

Responses

Status Description
200 A JWT token for API authentication
401 Invalid credentials
403 Email not verified
422 Validation errors

Response 200 body

{
    "id": "019222d4-1d93-7d47-a3c4-b547e009a0f7",
    "createdAt": "2024-06-30T19:00:00Z",
    "expiresAt": "2026-12-31T23:59:59Z",
    "lastUsedAt": null,
    "name": "My API Token",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}