← Back to Home
Developers

API Reference

The HR Instance REST API lets you integrate employee, leave, attendance, and payroll data with your existing tools.

Base URL

https://api.hrinstance.com

Rate Limit

100 req / min

5,000 req / hour per API key

Version

v1 (stable)

All endpoints prefixed with /api/v1/

Authentication

All API requests must include a Bearer token in the Authorization header. Obtain tokens via the login endpoint or generate API keys from Settings → API Keys in your dashboard.

# Example request with Bearer token

curl -X GET \

https://api.hrinstance.com/api/v1/employees \

-H "Authorization: Bearer YOUR_API_KEY" \

-H "Content-Type: application/json"

⚠️ Rate Limiting: Exceeding 100 requests per minute returns HTTP 429. Check the Retry-After header for the wait time. Enterprise plans support higher limits — contact us.

Response Format

All responses are JSON. Successful responses include a data field. Errors include error and message.

// Success (200)

{ "data": [{ "id": "emp_01", "name": "Priya Sharma", ... }], "total": 248, "page": 1 }

// Error (401)

{ "error": "UNAUTHORIZED", "message": "Invalid or expired Bearer token." }

Endpoints

GET/api/v1/employees
POST/api/v1/employees
GET/api/v1/employees/:id
PUT/api/v1/employees/:id
DELETE/api/v1/employees/:id
GET/api/v1/leaves
POST/api/v1/leaves
PUT/api/v1/leaves/:id/approve
PUT/api/v1/leaves/:id/reject
GET/api/v1/attendance
POST/api/v1/attendance/checkin
POST/api/v1/attendance/checkout
GET/api/v1/payroll
POST/api/v1/payroll/run
GET/api/v1/payroll/:id/payslip

Error Codes

400Bad RequestMissing or invalid request parameters.
401UnauthorisedMissing or invalid Bearer token.
403ForbiddenYour role does not have permission for this action.
404Not FoundThe requested resource does not exist.
429Too Many RequestsRate limit exceeded. Retry after the time in Retry-After header.
500Internal Server ErrorSomething went wrong on our end. Contact support if this persists.

Need API Access or Higher Rate Limits?

Enterprise plans include dedicated API keys and custom rate limits. Contact us for integration support.

Request API Access