Developers & API

The ASHR.work API

OpenAPI 3.1, a Swagger reference, RFC 9457 errors, cursor pagination, and X-Request-Idon every response. Product & module metadata is anonymous and read-only — no key needed. A scoped key reads your tenant's data and, for employees, leave, documents and recruitment, takes real actions on it.

Quickstart

Every endpoint is a plain GET. Base URL https://ashr.work/api.

# List available modules
curl -s https://ashr.work/api/v1/modules?status=available | jq

# One module
curl -s https://ashr.work/api/v1/modules/leave-management | jq

# Full capabilities manifest
curl -s https://ashr.work/api/v1/capabilities | jq

# With a Demystify API key (needed only for scoped endpoints)
curl -s -H "Authorization: Bearer dmk_live_..." https://ashr.work/api/v1/modules | jq

Endpoints

GET/v1/healthLiveness check.
GET/v1/capabilitiesFull capabilities manifest (product, modules, surfaces).
GET/v1/modules?status=available&limit=50List modules (cursor-paginated).
GET/v1/modules/{slug}One module by slug.

Tenant data endpoints

Read your own workspace’s data with a key that carries the resource’s scope. Every response is tenant-scoped to the key; each has a list and a /{id} variant.

GET/v1/whoami—The current key’s id, env and scopes.
GET/v1/employeesemployees:readList employees (list + /{id}).
GET/v1/leave-requestsleave:readLeave requests (list + /{id}).
GET/v1/leave-typesleave:readLeave types.
GET/v1/holidaysholidays:readHoliday calendar.
GET/v1/assetsassets:readAsset register.
GET/v1/attendance-recordsattendance:readDaily attendance rollups (list + /{id}).
GET/v1/job-openingsrecruitment:readRecruitment job openings.
GET/v1/helpdesk-ticketshelpdesk:readHelpdesk tickets.
GET/v1/surveyssurveys:readSurveys.
GET/v1/feedback-requestsreviews:readFeedback-on-demand requests (never the answers).
GET/v1/skillstalent:readThe skill library (never assessments).
GET/v1/pulse-surveyssurveys:readPulse definitions (never responses).
GET/v1/comp-cyclespayroll:readCompensation review cycles (never proposals).
POST/oauth/token—OAuth2: client_credentials + refresh_token grants.

Write endpoints

A key with the write scope can act on your workspace, not just read it — the same employee/leave/document/recruitment actions available in-app. Every write is idempotent where the operation allows it and audited exactly like an in-app action.

POST/v1/employeesemployees:writeCreate an employee.
PATCH/v1/employees/{id}employees:writeUpdate an employee.
POST/v1/leave-requestsleave:writeApply for leave (idempotent).
POST/v1/leave-requests/{id}/approveleave:approveApprove a leave request.
POST/v1/leave-requests/{id}/rejectleave:approveReject a leave request.
POST/v1/leave-requests/{id}/cancelleave:writeCancel a leave request.
POST/v1/attendance-records/{id}/regulariseattendance:writeApprove or reject a pending attendance regularisation.
POST/v1/documentsdocuments:writeGenerate a document from a template.
POST/v1/job-openingsrecruitment:writeOpen a job requisition.
PATCH/v1/job-openings/{id}recruitment:writeUpdate a job requisition.
POST/v1/candidatesrecruitment:writeAdd a candidate.
PATCH/v1/candidates/{id}recruitment:writeMove or update a candidate.

Guides

API keys

Keys are dmk_live_ / dmk_test_, sent as a Bearer token, hashed at rest, scoped per module, rotatable and revocable. The metadata API is anonymous; a key unlocks your tenant's data and, with the right scope, actions on it. Admins generate and manage keys in-app under Admin → Settings → Developer & API.

Import anywhere

Point Postman, Insomnia, Swagger UI or Scalar at /api/openapi.json, or grab the Postman collection. For agents, see /for-agents and the MCP server.