API

Rate limits

Per-key limits, the 429 and 503 responses, and how to back off.

How limits workLink to this section

  • Each API key has its own limit in requests per minute. Keys created in the dashboard get 60. The platform maximum is 600; ask us if you need more than the default.
  • Requests are counted in fixed one-minute windows that start on the minute (UTC). The count resets when the next minute begins.
  • The limit is enforced across all of IntelliDent’s servers, so it holds however your requests are routed.
  • Every request with a recognised key counts, including requests later refused for a missing scope. Requests without a valid key are not counted against any key.
  • Limits are per key, not per organisation. Separate integrations should use separate keys.

No remaining-requests headers

Responses do not include X-RateLimit-Limit or X-RateLimit-Remaining headers. Pace yourself to the key’s limit, and rely on Retry-After when you exceed it.

When you are limitedLink to this section

StatusCodeWhenHeaders
429RATE_LIMITEDThe key has used its requests for this minute.Retry-After
503RATE_LIMIT_UNAVAILABLEThe limiter could not count the request. We refuse rather than let uncounted traffic through. It is rare and short.Retry-After
429 Too Many Requests
HTTP/1.1 429 Too Many Requests
Retry-After: 23
Content-Type: application/json

{"success":false,"error":{"message":"Too many requests. Please try again later.","code":"RATE_LIMITED"}}

Backing offLink to this section

Wait for the number of seconds in Retry-After, then retry. For 500 responses, use exponential backoff. Keep the number of attempts small, and spread scheduled jobs across the minute instead of firing them all at once.

async function callIntelliDent(url: string, apiKey: string, attempts = 4): Promise<unknown> {
  for (let attempt = 1; ; attempt++) {
    const res = await fetch(url, { headers: { Authorization: `Bearer ${apiKey}` } });
    if (res.ok) return (await res.json()).data;

    const retryable = res.status === 429 || res.status === 503 || res.status >= 500;
    if (!retryable || attempt === attempts) {
      const body = await res.json().catch(() => ({}));
      throw new Error(`${res.status} ${body.error?.code ?? "UNKNOWN"}`);
    }
    // Prefer the server's Retry-After; fall back to exponential backoff.
    const retryAfter = Number(res.headers.get("Retry-After"));
    const waitSeconds = Number.isFinite(retryAfter) && retryAfter > 0 ? retryAfter : 2 ** (attempt - 1);
    await new Promise((r) => setTimeout(r, waitSeconds * 1000));
  }
}