v1

latestOpenAPI 3.0.12026-07-17172067.5 KB
Authentication

User login

Authenticates a user and returns a JWT token.

post/api/v1/auth/login

Request body

emailstring email required
passwordstring password required

Example request

{
  "email": "john@example.com",
  "password": "SecurePass123!"
}

Response

Login successful

statusboolean
messagestring

Example response

{
  "status": true,
  "message": "Login successful",
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "user": {
      "id": 1,
      "username": "johndoe",
      "email": "john@example.com",
      "full_name": "John Doe",
      "role": "admin",
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  }
}