> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-v6-beta2-flutter-uikit.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Rate Limits

> Understand CometChat REST API rate limits, how to monitor usage via response headers, and how to handle rate limit errors.

<Info>
  **Quick Reference** - Key rate limits at a glance:

  | Operation Type | Limit                  |
  | -------------- | ---------------------- |
  | Core           | 10,000 requests/minute |
  | Standard       | 20,000 requests/minute |
</Info>

## CometChat REST API Rate Limits

<Note>
  The rate limits below are for general applications. Rate limits can be adjusted on a per-need basis, depending on your use case and plan. The rate limits are cumulative. For example: if the rate limit for core operations is 10,000 requests per minute, then you can login a user, add a user to a group, remove a user from a group, etc. for a combined total of 10,000 requests per minute.
</Note>

| Operation Type          | Rate Limit                   | Examples                                                       |
| ----------------------- | ---------------------------- | -------------------------------------------------------------- |
| **Core Operations**     | `10,000` requests per minute | User login, create/delete user, create/join group (cumulative) |
| **Standard Operations** | `20,000` requests per minute | All other operations (cumulative)                              |

## What Happens When the Rate Limit is Reached?

The request isn't processed and a response is sent containing a `429` response code. Along with the response code, there will be a couple of headers sent which specify the time in seconds that you must wait before you can try the request again.

```
Retry-After: 15
X-Rate-Limit-Reset: 1625143246
```

## Is There an Endpoint That Returns Rate Limits?

No, CometChat does not provide a dedicated rate-limit endpoint.

However, the following response headers are included with every API response, which you can use to confirm the app's current rate limit and monitor the number of requests remaining in the current minute:

```
X-Rate-Limit: 700
X-Rate-Limit-Remaining: 699
```

<AccordionGroup>
  <Accordion title="Best Practices">
    * Monitor `X-Rate-Limit-Remaining` headers to proactively manage your request volume
    * Implement exponential backoff when you receive a `429` response
    * Use the `Retry-After` header value to determine when to retry
    * Batch operations where possible to reduce the total number of API calls
    * Cache responses locally to avoid redundant requests
  </Accordion>

  <Accordion title="Troubleshooting">
    * **Receiving 429 errors frequently:** Review your request patterns and consider batching or caching
    * **Rate limit seems too low:** Contact CometChat support to discuss adjustments based on your plan and use case
    * **Inconsistent rate limit headers:** Ensure you're reading headers from the correct response object in your HTTP client
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Key Concepts" icon="book" href="/sdk/react-native/key-concepts">
    Review the fundamental building blocks of CometChat
  </Card>

  <Card title="Setup & Authentication" icon="lock" href="/sdk/react-native/overview">
    Initialize CometChat and authenticate users in your app
  </Card>
</CardGroup>
