Skip to content
Tendral Health

Rate limits

Each API key may make 100 requests per minute. GET /v1/health is not limited.

How the window works

The window is a fixed 60 seconds, aligned to the start of each clock minute. Every authenticated request counts, including ones that fail. Each key has its own count, so two keys of one organization do not share a limit.

Headers

Every authenticated response carries:

HeaderMeaning
X-RateLimit-LimitRequests allowed per window for this key.
X-RateLimit-RemainingRequests left in the current window.
X-RateLimit-ResetWhen the window resets, in Unix seconds.
X-Request-IdThis request's id. Quote it when you write to us.

When you hit the limit

You get 429 with code RATE_LIMITED and a Retry-After header in seconds. Wait that long, then retry. Do not retry sooner: every refused request counts too.

Node
async function call(url: string, init: RequestInit): Promise<Response> {
  for (let attempt = 0; attempt < 5; attempt++) {
    const res = await fetch(url, init)
    if (res.status !== 429) return res
    const wait = Number(res.headers.get('Retry-After') ?? '1')
    await new Promise((r) => setTimeout(r, wait * 1000))
  }
  throw new Error('Still rate limited after 5 tries')
}