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

# Rate Limits

> Understand API rate limits and how to handle them.

The ColdSend API enforces rate limits to ensure platform stability and fair usage.

## Current Limits

| Limit               | Value |
| ------------------- | ----- |
| Requests per minute | 100   |
| Requests per hour   | 1,000 |

## Rate Limit Headers

Every API response includes rate limit information:

```text theme={null}
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1704067200
```

| Header                  | Description                                                             |
| ----------------------- | ----------------------------------------------------------------------- |
| `X-RateLimit-Limit`     | Maximum requests per window                                             |
| `X-RateLimit-Remaining` | Requests remaining in the current window                                |
| `X-RateLimit-Reset`     | Unix timestamp when the window resets                                   |
| `Retry-After`           | Seconds until the rate limit window resets (also sent on 429 responses) |

## Handling Rate Limits

### When You Hit the Limit

**Status:** `429 Too Many Requests`

```json theme={null}
{
  "detail": "Rate limit exceeded. Retry after 60 seconds."
}
```

### Implementing Exponential Backoff

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    import requests
    import time

    def api_request_with_retry(method, url, max_retries=5, **kwargs):
        for attempt in range(max_retries):
            response = requests.request(method, url, **kwargs)
            
            if response.status_code != 429:
                return response
            
            wait_time = 2 ** attempt  # 1s, 2s, 4s, 8s, 16s
            time.sleep(wait_time)
        
        return response
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    async function apiRequestWithRetry(url, options = {}, maxRetries = 5) {
      for (let attempt = 1; attempt <= maxRetries; attempt++) {
        const response = await fetch(url, options);
        
        if (response.status !== 429) {
          return response;
        }
        
        const waitTime = 2 ** attempt;
        await new Promise(resolve => setTimeout(resolve, waitTime * 1000));
      }
      
      throw new Error('Max retries exceeded');
    }
    ```
  </Tab>
</Tabs>

## Best Practices

1. **Batch operations** — Space out your requests when processing multiple items
2. **Cache responses** — Don't repeatedly poll the same endpoint. Cache for 5+ minutes.
3. **Use webhooks** — For real-time updates, configure webhooks instead of polling
4. **Check remaining requests** — Monitor `X-RateLimit-Remaining` headers before bulk operations

## Contacting Support

If you need higher rate limits, contact [support@coldsend.pro](mailto:support@coldsend.pro) with:

* Your account ID
* Expected request volume
* Detailed use case description
