API Reference
Elate HRMS exposes a REST API through Next.js API routes. All API routes are tenant-scoped and require authentication unless marked as public.
Base URL
All API endpoints are relative to your HRMS instance:
https://your-domain.com/api/Authentication
API routes use NextAuth session-based authentication. Requests must include a valid session cookie. Tenant context is automatically resolved from the authenticated user’s active tenant.
Common Response Format
Successful responses:
{
"data": { ... },
"message": "Success"
}Error responses:
{
"error": "Error description",
"status": 400
}API Categories
| Category | Base Path | Description |
|---|---|---|
| Authentication | /api/auth/* | Login, signup, password management |
| Employees | /api/employees/* | Employee CRUD and documents |
| Leave & Attendance | /api/leave-*, /api/attendance* | Leave types, requests, attendance |
| Payroll | /api/payroll/* | Salary processing and management |
| Recruitment | /api/recruitment/* | Hiring pipeline management |
| Helpdesk & Assets | /api/helpdesk/*, /api/assets/* | Support tickets and assets |
| Configuration | /api/configuration/* | System settings |
| Webhooks | /api/billing/webhook | Stripe webhook handling |
Public Endpoints
These endpoints do not require authentication:
| Endpoint | Description |
|---|---|
GET /api/public/appointment/:token | Get appointment details |
GET /api/public/appointment/:token/pdf | Download appointment PDF |
POST /api/public/appointment/:token/upload | Upload appointment documents |
GET /api/public/offers/:token | Get offer details |
GET /api/public/offers/:token/pdf | Download offer PDF |
Last updated on