Developers / Keys, limits and errors
Keys, limits and errors
The rules every endpoint follows. Read this once and the rest of the API holds no surprises.
Keys
An HR admin makes keys in ANOMA, under Developers. Each key belongs to one company, has a name, and has only the scopes it was given. It acts as the admin who made it, so the company’s leave rules, approval chains and payroll locks apply to it exactly as they do on screen.
Send it as a bearer token on every request:
curl https://app.anomahq.com/api/v1/me \
-H 'Authorization: Bearer ank_acme_3f9a…'Keys look like ank_<company>_<48 characters>. ANOMA shows a key once, when it is made, and keeps only a fingerprint of it. Keep keys on your server, never in an app people download. If one leaks, revoke it in Developers and make another.
Want to try first? Start a sandbox: a demo company with a key that has every scope, kept for 24 hours.
Scopes
A call without the scope it needs gets 403 forbidden. GET /v1/me works with any key and lists the key’s scopes.
Requests
The base address is https://app.anomahq.com/api. Send bodies as JSON with Content-Type: application/json. Dates are YYYY-MM-DD, times ISO 8601. The API answers any origin (CORS), with no cookies, so you can try it from a browser; real keys still belong on a server.
Every response has an x-request-id header, such as req_9f1c2a7b4d0e8f63. Quote it when you ask us about a call.
Pages of results
Lists that can be long come back a page at a time: { "data": [...], "has_more": true, "next_cursor": 57 }. Ask for up to 200 with ?limit= (50 if you don’t say). For the next page, send ?after= with the next_cursor you were given, until has_more is false.
let after = null, people = [];
do {
const res = await fetch(`https://app.anomahq.com/api/v1/employees?limit=200${after ? '&after=' + after : ''}`, {
headers: { Authorization: `Bearer ${process.env.ANOMA_KEY}` },
});
const page = await res.json();
people.push(...page.data);
after = page.has_more ? page.next_cursor : null;
} while (after);
console.log(people.length, 'people');import os
import requests
after, people = None, []
while True:
res = requests.get("https://app.anomahq.com/api/v1/employees",
params={"limit": 200, **({"after": after} if after else {})},
headers={"Authorization": f"Bearer {os.environ['ANOMA_KEY']}"}, timeout=30)
page = res.json()
people += page["data"]
if not page["has_more"]:
break
after = page["next_cursor"]
print(len(people), "people")Errors
Anything that is not 2xx has the same shape, with a message written for people:
{
"error": {
"type": "invalid_request",
"message": "decision must be approved or rejected."
}
}| Status | type | Means |
|---|---|---|
400 | invalid_request | Something in the request is missing or wrong. The message says what. |
401 | unauthorized | No key, a key that is not valid, or a company no longer on ANOMA. |
402 | payment_required | The company’s plan or wallet needs attention before this can run. |
403 | forbidden | The key does not have the scope this endpoint needs. |
404 | not_found | No such endpoint, or no such record. |
405 | method_not_allowed | The path exists, but not with this method. |
409 | conflict | The request clashes with the record’s state, such as a payroll month that is not locked yet. |
413 | too_large | The body is too big. |
429 | rate_limited | Too many requests. Wait a little and try again. |
500 | server_error | Something went wrong on our side. Try again, and tell us the request id if it keeps happening. |
Rate limits
Each key can make up to 600 requests a minute. Past that, calls get 429 rate_limited until the minute is up. Spread bulk work out, and use webhooks instead of asking the same question every few seconds.
Sandboxes: one address can make up to 6 an hour. Reuse the one you have; this site keeps it for you until it ends.
Versions
This is version 1, dated 2026-11-24. GET /v1/me and every webhook body carry api_version. We add fields and endpoints without warning, so ignore fields you don’t know. Anything that would break a working integration comes as /v2, with notice.
The whole contract is also an OpenAPI 3.1 file, for Postman, Insomnia or generating a client.