> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getaptly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rate Limits

> Request limits per API key and how to handle 429 responses.

The Aptly API enforces rate limits per API key to ensure stability across all integrations.

## Limits

| Scope       | Limit                        |
| ----------- | ---------------------------- |
| Per API key | 120 requests per minute      |
| Burst       | Up to 20 requests per second |

<Note>
  These are the current defaults. Limits may be adjusted for specific plans or use cases. Contact Aptly support if your integration requires higher throughput.
</Note>

## 429 responses

When you exceed the rate limit, the API returns a `429 Too Many Requests` response:

```json theme={null}
{ "reason": "Rate limit exceeded. Try again shortly." }
```

The response includes a `Retry-After` header indicating how many seconds to wait before retrying.

## Handling rate limits

Implement exponential backoff when you receive a `429`:

```javascript theme={null}
async function fetchWithRetry(url, options, retries = 3) {
  const response = await fetch(url, options);

  if (response.status === 429 && retries > 0) {
    const retryAfter = response.headers.get("Retry-After") || 2;
    await new Promise(res => setTimeout(res, retryAfter * 1000));
    return fetchWithRetry(url, options, retries - 1);
  }

  return response;
}
```

## Best practices

* Fetch the board schema once and cache it. Do not fetch the schema on every request.
* Batch card updates where possible instead of making one request per card.
* When paginating through large boards, add a small delay between page requests.
* Use a single API key per integration. Multiple keys from the same company share the same underlying account limits.
