API reference
Generate realistic synthetic HRIS data over HTTP. Same engine as the dashboard, reachable from a build server with a key.
This page is the human reference. The machine-readable spec is at /api/openapi.json, and every column the generator emits is listed in the field reference with types and sources.
Authentication
Every request carries a Bearer API key. Mint one from the signed-in
dashboard; the full key is shown once, so save it then. Send it in the
Authorization header:
Authorization: Bearer shr_live_YOUR_KEY
A key inherits your plan's tier and rate limit. Tier and limits are keyed
on your account, not on the key, so minting more keys does not raise your
quota. Create and revoke keys with the /api/keys endpoints,
which are reachable from a signed-in session only, never with a key.
Endpoints
| Method and path | What it does |
|---|---|
POST /api/generate |
Start a snapshot generation. Returns a job id to poll. |
POST /api/history/generate |
Snapshot plus 36 months of event history. Pass snapshot_only for the cheap snapshot path in CI. |
POST /api/merge/generate |
Output shaped to a Merge vendor's field schema. |
GET /api/jobs/{job_id}/status |
Poll a job. When complete it lists the files to download. |
GET /api/jobs/{job_id}/download/{filename} |
Download a finished file. |
GET /api/industries |
Industries available to your plan. |
GET /api/data-dictionary |
Every emitted column, with types, examples and sources. |
Example
Generate a thousand-person technology company, poll it, then download the CSV:
curl -X POST https://synthetic-hris.com/api/generate \
-H "Authorization: Bearer $SHR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"org_size": 1000, "industry": "technology", "seed": 42}'
# Returns a job id and a status url:
# {"job_id": "...", "status_url": "/api/jobs/{id}/status", ...}
curl -H "Authorization: Bearer $SHR_API_KEY" \
https://synthetic-hris.com/api/jobs/$JOB_ID/status
# Once complete, download a file it lists:
curl -H "Authorization: Bearer $SHR_API_KEY" \
https://synthetic-hris.com/api/jobs/$JOB_ID/download/$FILENAME -o employees.csv
Pass a seed and reference_date for byte-identical
output on every run, which is what makes a committed fixture reproduce in
CI. Omit the seed and one is minted and returned, so a company you liked is
not lost.
Rate limits
Generation is CPU bound and serialized per account. A paid plan allows
one generation in flight at a time and a ceiling of 60 per hour; a
request over either gets a 429 with a
Retry-After header rather than queueing. A single request
is capped at 50,000 employees. For the lightest CI load, ask the
history endpoint for snapshot_only and skip the report.