API
Everything the console does, for your scripts.
Envelope and authentication
Every response is {"status": "SUCCESS", "data": …}, or an error with a message. Authenticate with a bearer token from POST /api/auth/login or your identity provider, or with an API key created under Users & access → API keys and sent as X-API-Key. OpenAPI docs are served at /docs on the API.
TOKEN=$(curl -s -X POST https://peoplehq.example.com/api/auth/login -H "Content-Type: application/json" \
-d '{"username": "you@company.com", "password": "…"}' | jq -r .data.access_token)Endpoints
| Group | Endpoints | Role |
|---|---|---|
| Entities | GET/POST /api/entities, PATCH/DELETE /api/entities/{id} | read: hr, manager, viewer; write: hr |
| People | GET/POST /api/people (filters kind, status, country, q), GET/PATCH/DELETE /api/people/{id} | read; write: hr |
| A person’s work | POST /api/people/{id}/start/onboarding|offboarding, GET …/tasks, GET …/documents, GET …/resume (HTML) | read; start: hr |
| Templates | GET/POST /api/templates (filters country, kind), GET/PATCH /api/templates/{id}, POST …/preview | read; write: hr |
| Documents | GET/POST /api/documents, GET/PATCH/DELETE /api/documents/{id}, POST …/send, POST …/void, GET …/page (HTML) | read; write: hr |
| Checklists & tasks | GET/POST /api/checklists, PATCH /api/checklists/{id}, GET /api/tasks, PATCH /api/tasks/{id} | read; tasks: hr, manager; checklists: hr |
| Overview & settings | GET /api/overview, GET/PUT /api/settings | read; write: hr |
| Signing (public) | GET/POST /api/public/sign/{token} | no account: the token is the key |
| AI | POST /api/ai/draft-letter, POST /api/ai/resume-summary/{id}, GET /api/ai/status | hr (status: any user) |
| Platform | /api/auth, /api/user, /api/audit, /api/workspaces, /api/connections, /api/notifications, /api/health | per endpoint |
An administrator holds every role. A request for another organization’s record answers 404, exactly as a missing one does.
Worked examples
Add a person (placed on the country’s default entity)curl -X POST https://peoplehq.example.com/api/people -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"first_name": "Asha", "last_name": "Rao", "kind": "intern", "status": "offer", "country": "IN",
"title": "Data Science Intern", "start_date": "2027-01-04", "end_date": "2027-06-30",
"compensation": {"amount": 25000, "currency": "INR", "period": "stipend_month"}}'Make a letter from a templatecurl -X POST https://peoplehq.example.com/api/documents -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"person_id": "<person>", "template_id": "<in.offer_intern template>",
"values": {"duration": "six months", "project": "Forecasting models", "respond_by": "2026-12-15"}}'
# → the draft, with "missing": [] listing any merge field left emptySend it for signaturecurl -X POST https://peoplehq.example.com/api/documents/<document>/send -H "Authorization: Bearer $TOKEN"
# → {"status": "sent", "sign_path": "/sign/<token>", "link_days": 14, …}
# share https://peoplehq.example.com/sign/<token> with the person; nothing is emailedOpen steps for IT, from a scriptcurl -s "https://peoplehq.example.com/api/tasks?owner=it" -H "X-API-Key: $PEOPLEHQ_KEY"The signing endpoints
GET /api/public/sign/{token} returns the letter page, title, status and company, and marks a sent letter viewed. POST with {"name": "Full Name", "agree": true} signs; with {"decline": true, "reason": "…"} declines. A token shorter than 20 characters, unknown, voided or past its days answers 404 or 410.