Rate limits exist to protect our API and to ensure the correct implementation of the API. With proper usage, the rate limits given in the Standard Plan are usually enough for the volume that is permitted in this plan. On Enterprise plans, they are adjusted as necessary. You may have received an email indicating that you have been rate limited on an endpoint and would like to know more.
What is rate-limiting? Why are we receiving alerts?
There is a limit to the number of API calls you can make per 1 minute or per 15-minute window. Suppose, you have reached the rate-limit on queryMember() endpoint, you wouldn't be able to call queryMember() again until the time window expires. For example - if you reach 3000 calls per 15-minute window, you wouldn't be able to call queryMembers() again for the next 15 minutes. Note - The limit is applied only to that particular endpoint and you can perform other API calls. Each API call has different rate limits
Rate-limiting an API function for an API_KEY doesn't affect API calls for different API functions during the same time window.
It is not easy to hit these limits unless you have unexpected traffic or there is an integration issue.
When a client is rate limited, the additional headers are passed along with code 429
X-RateLimit-Limit The maximum number of requests that the consumer is permitted to make per hour.
X-RateLimit-Remaining The number of requests remaining in the current rate limit window.
X-RateLimit-Reset The time at which the current rate limit window resets in UTC epoch seconds.
Can Rate Limits be Increased?
The short answer is Yes.
Rate limits exist for three main reasons - to protect our API, to protect you from breaking errors in your app related to the integration with Stream, and to encourage a solid integration and identify potential issues early on.
We try to be as transparent as possible with rate limits. You can read more about Chat rate limits here, and for Feeds here. See each rate limit by endpoint here, and see the rate limits applied to your apps in your Dashboard.
We understand that each integration is different, and as your volume grows you may encounter some rate limits during production level traffic. The Stream team will increase rate limits for you when your integration is sound, your use case of the endpoint is correct, and your user-base requires it.
We never intend to use rate limits as a pay gate to increased access to the API or to encourage a customer to sign up for a larger plan.
Please sign in to leave a comment.