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

RoleAccess
superadminFull platform access
distributorMulti-company management
adminCompany management
hrAttendance + payroll
managerAttendance view
employeeOwn records only
viewerRead-only

Interactive Docs

Visit /api/docs for the full interactive Swagger UI.