auth

User login

Authenticate user with email and password, returns JWT token

post/auth/login

Request body

emailstring required

User email address

passwordstring required

User password

Example request

{
  "email": "admin@example.com",
  "password": "password123"
}

Response

Login successful

access_tokenstring required
user_idnumber required
namestring required
emailstring required
rolesstring[] required

Example response

{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user_id": 1,
  "name": "John Doe",
  "email": "admin@example.com",
  "roles": [
    "admin"
  ]
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.