Skip to main content
This endpoint validates an email and password combination and returns a signed JWT on success. Pass the returned jwt_token value in the X-OTAS-USER-TOKEN header for any endpoint that requires authentication. No prior authentication is needed to call this endpoint.
The request body accepts either password or Password (capital P) for the password field. Both keys are checked; Password takes precedence if both are present.

Request

Method: POST
URL: http://localhost:8000/api/user/v1/login/
Authentication: None

Body parameters

email
string
required
The registered email address. Matched case-insensitively.
password
string
required
Account password. Also accepted as Password (capital P).

Response

status
integer
required
1 on success, 0 on failure.
status_description
string
required
login_success on success, login_failed on failure.
response
object
Present only on a successful login.

Example

curl --request POST \
  --url http://localhost:8000/api/user/v1/login/ \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "ada@example.com",
    "password": "securepassword"
  }'
{
  "status": 1,
  "status_description": "login_success",
  "response": {
    "user": {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "first_name": "Ada",
      "middle_name": "",
      "last_name": "Lovelace",
      "email": "ada@example.com",
      "created_at": "2026-04-16T10:00:00.000000",
      "updated_at": "2026-04-16T10:00:00.000000"
    },
    "jwt_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
  }
}

Error responses

status_descriptionHTTP statusCause
login_failed401Invalid credentials, missing fields, or unexpected server error.

Build docs developers (and LLMs) love