Every module for ₹9 per employee. Hosting and security included. No sales calls. Every module, ₹9 per employee Pricing →

Sign in Get started

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:

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

API scopes
ScopeLets a keyEndpoints
employees:readRead people, departments and holidaysGET /v1/employees
GET /v1/employees/{id}
GET /v1/departments
GET /v1/holidays
employees:writeAdd people and change their detailsPOST /v1/employees
PATCH /v1/employees/{id}
leave:readRead leave types, balances and requestsGET /v1/leave/types
GET /v1/leave/balances
GET /v1/leave/requests
GET /v1/leave/requests/{id}
leave:writeRequest and cancel time off for peoplePOST /v1/leave/requests
POST /v1/leave/requests/{id}/cancel
attendance:readRead attendanceGET /v1/attendance
attendance:writeSend punches from devices or other systemsPOST /v1/attendance/punches
expenses:readRead expense claimsGET /v1/expenses/claims
approvals:writeSee waiting requests and approve or decline themGET /v1/approvals
POST /v1/approvals/{kind}/{ref_id}/decide
payroll:readRead locked payroll months (paid days, LOP, expenses to pay)GET /v1/payroll/months
GET /v1/payroll/months/{month}
webhooks:manageAdd and remove webhook endpoints, read events and deliveriesGET /v1/events
GET /v1/webhooks
POST /v1/webhooks
DELETE /v1/webhooks/{id}
POST /v1/webhooks/{id}/test
GET /v1/webhooks/deliveries
GET /v1/webhooks/deliveries/{id}
POST /v1/webhooks/deliveries/{id}/redeliver

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');

Errors

Anything that is not 2xx has the same shape, with a message written for people:

Response · 400
{
  "error": {
    "type": "invalid_request",
    "message": "decision must be approved or rejected."
  }
}
Error statuses
StatustypeMeans
400invalid_requestSomething in the request is missing or wrong. The message says what.
401unauthorizedNo key, a key that is not valid, or a company no longer on ANOMA.
402payment_requiredThe company’s plan or wallet needs attention before this can run.
403forbiddenThe key does not have the scope this endpoint needs.
404not_foundNo such endpoint, or no such record.
405method_not_allowedThe path exists, but not with this method.
409conflictThe request clashes with the record’s state, such as a payroll month that is not locked yet.
413too_largeThe body is too big.
429rate_limitedToo many requests. Wait a little and try again.
500server_errorSomething 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.