Securely integrate with employee data, departments, positions, and HR workflows
Welcome to the HRMS Public API! This gateway enables external systems to securely integrate with your organization's HR data and workflows.
The HRMS Public API serves as a secure data mapping center that exposes your organization's employee data, departmental information, leave records, and other HR-related information through standardized REST endpoints. It supports multiple integration methods including direct API calls, SCIM (System for Cross-domain Identity Management), and Webhooks.
This guide will help you set up application tokens and make your first API request in just a few minutes. Whether you're building a custom integration or connecting third-party HR tools, we've got you covered.
Before you begin, ensure you have the following:
curl (command line)Application tokens are used to authenticate your API requests securely. Each token can be scoped to specific permissions.
users:read - Read user/employee datadepartments:read - Read department informationpositions:read - Read position/job titles⚠️ Important: Your token is displayed only once. Store it securely in your environment variables or secret management system. If you lose it, you'll need to generate a new token.
curl -H "Authorization: Bearer YOUR_APPLICATION_TOKEN" \
-H "X-Environment: staging" \
https://dev.workbeats.app/api/v1/usersconst headers = {
'Authorization': 'Bearer YOUR_APPLICATION_TOKEN',
'Content-Type': 'application/json',
'X-Environment': 'staging'
};
fetch('https://dev.workbeats.app/api/v1/users', { headers })
.then(res => res.json())
.then(data => console.log(data));import requests
headers = {
'Authorization': 'Bearer YOUR_APPLICATION_TOKEN',
'Content-Type': 'application/json',
'X-Environment': 'staging'
}
response = requests.get(
'https://dev.workbeats.app/api/v1/users',
headers=headers
)
print(response.json())Let's make a simple request to fetch a list of all users in your organization.
curl -X GET https://dev.workbeats.app/api/v1/users \
-H "Authorization: Bearer YOUR_APPLICATION_TOKEN" \
-H "Content-Type: application/json" \
-H "X-Environment: staging"https://dev.workbeats.app/api/v1/usersAuthorization: Bearer YOUR_APPLICATION_TOKENX-Environment: staging (or uat)200 OK - Successful Response:
{
"data": [
{
"id": "user_001",
"type": "user",
"attributes": {
"staffId": "S0001",
"email": "john.doe@company.com",
"name": "John Doe",
"preferred_name": "John",
"phone": "+60123456789",
"status": "active"
}
}
]
}You can also fetch details of a specific user by ID:
curl -X GET https://dev.workbeats.app/api/v1/users/user_001 \
-H "Authorization: Bearer YOUR_APPLICATION_TOKEN" \
-H "X-Environment: staging"All API endpoints are relative to the base URL:
https://dev.workbeats.app/apiWe're currently on API version v1. All endpoints are prefixed with /v1.
| Method | Endpoint | Description |
|---|---|---|
GET |
/v1/users | List all users |
GET |
/v1/users/{userId} | Get user details (includes department, position, work locations) |
GET |
/v1/departments | List all departments |
GET |
/v1/positions | List all positions/job titles |
The API uses JSON for all request and response bodies.
Content-Type Header Required:
Content-Type: application/jsonEvery API request requires the following headers:
Authorization: Bearer YOUR_APPLICATION_TOKEN
X-Environment: stagingHeader Details:
Authorization - Your application token for authenticationX-Environment - Target environment based on where your token was generated:
staging - Use this if your application token was generated from emspaced.hd.mybrandname.couat - Use this if your application token was generated from hrms.emspaced.com (Production)Example with JavaScript:
const headers = {
'Authorization': 'Bearer YOUR_APPLICATION_TOKEN',
'Content-Type': 'application/json',
'X-Environment': 'staging' // or 'uat' if token from production
};The API returns standard HTTP status codes and detailed error messages. Here are the most common scenarios:
Cause: Malformed request or missing required parameters
Example Response:
{
"message": "Validation failed",
"errors": {
"email": ["The email field is required."]
}
}Cause: Missing or invalid authentication token
Example Response:
{
"message": "Unauthenticated"
}Solution: Verify your token is correct and included in the Authorization header.
Cause: Token lacks required scopes for this endpoint
Example Response:
{
"message": "Insufficient permissions for this resource"
}Solution: Add the required scope to your application token in the Integrations settings.
Cause: The requested resource doesn't exist
Example Response:
{
"message": "Resource not found"
}Cause: Server-side error (rare, but can happen)
Solution: Please contact support if errors persist.
You've successfully made your first API request! Here's what you can explore next:
Explore the complete API documentation with interactive examples and detailed endpoint specifications.