Rate Limits

Last Edit: Sep 22 2020

Every Application is rate limited at the API endpoint. These limits are set on 1-minute and 15-minute time windows, API requests have specific rate limits. For example, reading a channel has a different limit than sending a message.

User and App Base Rate Limits

There are two kinds of rate limits for Chat: app rate limits and user rate limits. App rate limits are calculated per endpoint for your entire application. When the limit is hit, all calls from the same app and endpoint will result in an error. To avoid individual users to use your entire quota, every single user is limited to at most 60 requests per minute (per API endpoint). When the limit is exceeded, only requests from that user will be rejected.

What Happens When You Are Rate Limited

If an API call exceeds a rate limit during the target time window, subsequent requests for the same API function will be rejected. The payload returned for that API call will indicate that rate-limiting has occurred.

If your application becomes rate-limited, it doesn't block other API calls from working. For example, hitting a rate limit on follows will still allow you to read feeds. Each "resource" is rate-limited separately.

Rate limits are reset at the end of each time window.

How to Avoid Rejected API Requests

For Enterprise plans, Stream will review your architecture, and set higher rate limits for your production application. For other paid plans, you will need to review responses from Stream to watch for error conditions indicating that your API request was rate-limited and retry. We recommend implementing an exponential back-off retry mechanism.

Rate Limit Headers

Header

description

X-RateLimit-Limit

the total limit allowed for the resource requested (ie. 5000)

X-RateLimit-Remaining

the remaining limit (ie. 4999)

X-RateLimit-Reset

when the current limit will reset (unix timestamp)

Rate Limits by Endpoint

Please reference the following table for basic plan rate limits by endpoint (on a per minute and per 15 minute basis):

API Request

Calls Per Minute

Calls Per 15 Minutes

Connect

10,000

100,000

Get or Create Channel

10,000

100,000

Mark All Read

10,000

100,000

Mark Read

10,000

100,000

Query Channels

10,000

100,000

Send Event

10,000

100,000

Delete Message

1,000

10,000

Get Message

1,000

10,000

Delete Reaction

1,000

10,000

Get Reactions

1,000

10,000

Get Replies

1,000

10,000

Query Users

1,000

10,000

Run Message Action

1,000

10,000

Send Message

1,000

10,000

Send Reaction

1,000

10,000

Stop Watching Channel

1,000

10,000

Update Message

1,000

10,000

Upload File

1,000

10,000

Upload Image

1,000

10,000

Create Guest

1,000

10,000

Ban

300

3,000

Edit Users

300

3,000

Flag

300

3,000

Mute

300

3,000

Search

300

3,000

Unban

300

3,000

Unflag

300

3,000

Unmute

300

3,000

Update Channel

300

3,000

Update Users

300

3,000

Create Device

300

3,000

Hide Channel

300

3,000

Show Channel

300

3,000

Update Users (Partial)

300

3,000

Create Channel Type

60

600

Deactivate User

60

600

Delete Channel

60

600

Delete Channel Type

60

600

Delete Device

60

600

Delete File

60

600

Delete User

60

600

Export User

60

600

Get App

60

600

Get Channel Type

60

600

List Channel Types

60

600

List Devices

60

600

Truncate Channel

60

600

Update App

60

600

Update Channel Type

60

600

Check Push

60

600

Activate User

60

600

The rate limits above are for general applications. Rate limits can be adjusted on a per need basis, depending on your use-case and plan.