×

POST /api/login

Description

Authenticate user and receive JWT token.

URL

HTTP
POST /api/login

Authentication

Not Required

Request Body

JSON
{
  "email": "[email protected]",
  "password": "Tax1099!"
}

Validations

Field

Rule

email
Required, valid email format
password
Required

Success Response (200)

JSON
{
  "token": "<JWT>",
  "user": {
    "UserKey": "<userKey>",
    "email": "[email protected]"
  }
}
Use:
  • token→ Authorization header
  • UserKey→ for next APIs

Errors

Status

Reponse

400
Email/password missing
400
Invalid email format
401
User not found
401
Invalid credentials