Back to Help
Authentication
Last updated: 8/28/2026
Authentication API
All API endpoints (except login) require a Bearer token in the Authorization header.
Login
POST /api/v1/auth/login
Content-Type: application/json
{ "username": "admin", "password": "yourpassword" }
Response:
{
"access_token": "eyJ...",
"refresh_token": "eyJ...",
"token_type": "bearer"
}
Using the Token
GET /api/v1/personnel/employees
Authorization: Bearer eyJ...
Refresh Token
POST /api/v1/auth/refresh
{ "refresh_token": "eyJ..." }
Current User
GET /api/v1/auth/me
Roles & Permissions
| Role | Access |
|---|---|
| superadmin | Full platform access |
| distributor | Multi-company management |
| admin | Company management |
| hr | Attendance + payroll |
| manager | Attendance view |
| employee | Own records only |
| viewer | Read-only |
Interactive Docs
Visit /api/docs for the full interactive Swagger UI.