×

Authentication API

Use this endpoint to exchange user credentials for a JWT. Include the token as Bearer in subsequent calls.
Endpoint: POST /api/login
Description: Authenticates a user with email and password. Returns a JWT token and user details if successful.
Request Body
JSON
{
  "email": "string (required)",
  "password": "string (required)"
}
Responses
JSON
// Success
{
  "token": "JWT token string",
  "user": {
    "id": "GUID",
    "email": "string",
    "firstName": "string",
    "lastName": "string",
    "UserKey": "GUID"
  }
}
// Failure (examples)
{ "success": false, "message": "Invalid credentials" }
{ "success": false, "message": "User not found" }