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

# Rate Limits

> API rate limiting policies and how to handle rate limit errors.

# Rate Limits

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

## Default limits

| Scope                    | Limit        | Window   |
| ------------------------ | ------------ | -------- |
| Per user                 | 100 requests | 1 minute |
| Per IP (unauthenticated) | 20 requests  | 1 minute |

## Rate limit headers

Every response includes rate limit information:

```http theme={null}
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1707580800
```

| Header                  | Description                              |
| ----------------------- | ---------------------------------------- |
| `X-RateLimit-Limit`     | Maximum requests allowed in the window   |
| `X-RateLimit-Remaining` | Requests remaining in the current window |
| `X-RateLimit-Reset`     | Unix timestamp when the window resets    |

## Handling rate limits

When you exceed the limit, you'll receive a `429` response:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests, please try again later"
  }
}
```

### Best practices

<AccordionGroup>
  <Accordion title="Implement exponential backoff">
    When you receive a 429, wait and retry with increasing delays: 1s, 2s, 4s, 8s...
  </Accordion>

  <Accordion title="Use the Reset header">
    Check `X-RateLimit-Reset` to know exactly when you can resume.
  </Accordion>

  <Accordion title="Batch operations where possible">
    Send messages with reasonable delays between them rather than bursting.
  </Accordion>

  <Accordion title="Cache responses">
    Avoid re-fetching data that hasn't changed (e.g., instance details, contact info).
  </Accordion>
</AccordionGroup>
