# Rate limits

> How many calls a Duty API key can make per minute, the headers that report it, and how to back off.

Each API key can make **120 requests per minute** by default. The window is per key, so two integrations with their own keys never slow each other down.

Every response reports where you stand:

| Header | Meaning |
| --- | --- |
| `RateLimit-Limit` | Requests allowed per window. |
| `RateLimit-Remaining` | Requests left in the current window. |
| `RateLimit-Reset` | Seconds until the window resets. |

Over the limit, the API answers `429 Too Many Requests` with `RATE_LIMITED` and a `Retry-After` header with the seconds to wait:

```http
HTTP/1.1 429 Too Many Requests
Retry-After: 18
RateLimit-Limit: 120
RateLimit-Remaining: 0
RateLimit-Reset: 18
```

## Staying under the limit

- **Use webhooks** instead of polling for changes. See [Webhooks](/en/api/webhooks/).
- **Sync incrementally** with `updatedSince` instead of reading every page again. See [Sync requests](/en/api/guides/sync-requests/).
- **Cache catalogs.** Services, statuses and priorities rarely change; refresh them every few hours.
- **Honor `Retry-After`**, then resume at a steady pace rather than in a burst.

```js
async function callDuty(url, init) {
  for (let attempt = 0; attempt < 5; attempt++) {
    const response = await fetch(url, init);
    if (response.status !== 429) return response;
    const wait = Number(response.headers.get('Retry-After') ?? 1);
    await new Promise((resolve) => setTimeout(resolve, wait * 1000));
  }
  throw new Error('Duty API rate limit: gave up after 5 attempts');
}
```

Need a higher limit for a large migration? Contact Gold Master support with your workspace and the expected volume.
