ProfitFlow
  1. Authentication
ProfitFlow
  • Authentication
    • Login
      POST
    • Logout
      POST
  • Categories
    • List categories
      GET
    • Get category
      GET
  • Units
    • List available units
      GET
    • Get unit details
      GET
  • Schemas
    • User
    • Category
    • Error
    • Unit
    • ValidationError
    • PaginationLinks
    • PaginationMeta
  1. Authentication

Login

POST
/login
Authenticate an investor and receive an access token.
Note: Only users with the investor role can login via this API.
Admin users will receive a 401 Unauthorized response.

Request

Header Params

Body Params application/jsonRequired

Example
{
    "email": "ahmed@profitflow.com",
    "password": "Investor@2026!"
}

Responses

🟢200
application/json
Login successful
Body

Example
{
    "message": "Login successful.",
    "user": {
        "id": 1,
        "name": "Ahmed Al-Rashid",
        "email": "ahmed@profitflow.com",
        "phone": "+966501234567",
        "locale": "en"
    },
    "token": "1|abc123def456..."
}
🟠401
🟠422
Modified at 2026-01-31 10:08:19
Next
Logout
Built with