Rate limits
Kustomer's org-wide request limits by plan, search and webhook limits, per-object update limits, rate-limit headers, and how to stay under them.
Kustomer limits how many API requests an org can make per minute, and how often a single record can be changed. Limits protect your org's performance for agents. When you exceed one, the API returns 429 Too Many Requests until the window resets.
Org-wide API limit
Requests made with machine-user tokens count toward one shared budget for your org, measured over 60 seconds. Machine-user tokens are API keys, and OAuth tokens issued with the offline_access scope. Every one of them draws from the same budget, including bulk requests and paginated requests. People signed in to Kustomer, and OAuth tokens that act as them, have their own per-user limit instead (see below).
Workflows and business rules running inside Kustomer don't count against this limit.
Other request limits
Kustomer's built-in integrations aren't subject to your org's limit. Inbound email has its own sender protection: 120 emails per hour from the same address.
Object limits
To stop runaway loops, Kustomer also limits how often one user (or one API key) can change a single record, no matter how much of your budget is left:
Records created with importedAt skip the per-customer create limit, so historical imports aren't throttled by it. They still count toward the org-wide limit.
Headers
Every response that counts toward a limit reports your budget:
HTTP/1.1 429 Too Many Requests
x-ratelimit-limit: 1000
x-ratelimit-remaining: 0
x-ratelimit-reset: 1761058860Writes that an object limit applies to also report that limit, so you can tell which one a 429 came from:
Handling 429s
Wait for the reset
On a
429, sleep untilx-ratelimit-object-resetif it's there, since an object limit can last 10 minutes, and otherwise untilx-ratelimit-reset. Then retry. Add a little random jitter so parallel workers don't all retry at the same instant.Slow down before you hit the limit
Watch
x-ratelimit-remaining. When it falls below about 10% of the limit, spread the requests you have left over the rest of the minute.Share the budget
If several services use the same org, give each a share (for example, 40% for the nightly sync and 20% for webhooks), and run them through a shared limiter or queue.
class KustomerLimiter {
private remaining = Infinity
async request(url: string, init: RequestInit): Promise<Response> {
if (this.remaining < 25) await sleep(60_000 / Math.max(this.remaining, 1))
const res = await fetch(url, init)
if (res.status === 429) {
// An object limit sends its own reset, which can be minutes later than the org's.
const reset = Number(res.headers.get('x-ratelimit-object-reset') ?? res.headers.get('x-ratelimit-reset') ?? 0) * 1000
this.remaining = Infinity
await sleep(Math.max(reset - Date.now(), 1000) + Math.random() * 500)
return this.request(url, init)
}
this.remaining = Number(res.headers.get('x-ratelimit-remaining') ?? Infinity)
return res
}
}
const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms))Using fewer requests
- Bulk endpoints. Create or update up to 100 records in one job. See Bulk operations.
- Bigger pages. Use the largest
pageSizethe endpoint allows. include. Side-load related records instead of fetching them one by one.- Webhooks over polling. Let Kustomer tell you what changed. See Outbound webhooks.
- Skip no-op writes. Compare before you update. It saves budget and avoids object limits.
idsOnlysearches. Return just the IDs when that's all you need.