Rate limits in Nylas
Rate limits apply when making requests to the Nylas API and adding account information in the Dashboard. This page describes the limits you may encounter.
Nylas rate limits
The table below describes API and Dashboard rate limits. These apply to all endpoints, except the endpoints listed for concurrent and IP address endpoint rate limits.
Scope | Type | Rate limit | Expiration |
---|---|---|---|
Application | General | Allows up to 500 requests per endpoint. | 1 second |
Account | General | Allows up to 50 requests per endpoint. | 1 second |
Scope
Nylas implements rate limits in two ways: by application, and by account. This scope indicates that the rate limit applies to either your entire Nylas application, or to an individual connected account.
For individual accounts, the rate limit is applied to the access_token
used to make an API call.
Concurrent rate limits
Scope | Type | Rate limit | Endpoints |
---|---|---|---|
Account | Concurrent | Allows up to 10 concurrent requests. | /delta/streaming |
Account | Concurrent | Allows up to 10 concurrent requests. | /delta/longpoll |
Account | Concurrent | Allows up to 5 concurrent requests. | /messages/threads/contacts |
IP address endpoint rate limits
The GET /a/<client_id>/ip_addresses
endpoint has its own rate limits, as described in the table below.
Scope | Type | Rate limit | Expiration |
---|---|---|---|
Application | General | Allows up to 10 requests per endpoint. | 1 hour |
Provider rate limits
Nylas API calls are also subject to the rate limits for the underlying providers, so keep these in mind when you build your Nylas application. Unfortunately not all IMAP providers publish this information.
See each provider's official documentation for information about their rate limits:
- Microsoft
- Microsoft Graph: Outlook (includes both email and calendar)
- iCloud mail
🔍 Google is changing their sender requirements. As of February 2024, Gmail has new requirements for accounts that send more than 5,000 email messages per day. For more information, see Google's official documentation.
429 error code response
If you receive a 429
error code response from Nylas, it includes information about why the request was rate-limited, as well as information about how long you should wait until you make another request.
The response includes two headers: X-RateLimit-Limit
and X-RateLimit-Reset
. The former indicates the rate limit, and the latter specifies the time until the limit expires, in seconds.
{
'X-RateLimit-Limit': '500',
'X-RateLimit-Reset': '10'
}
Rate limit messages
The following table describes the rate limit messages you may encounter in the body of a 429
error code response.
Possible rate limit messages include:
Message | Description |
---|---|
"Too many requests from this application" | You reached the application rate limit. |
"Too many requests" | You reached the account rate limit for a single endpoint. |
"Too many concurrent streaming requests" | You made too many concurrent requests to the /delta/ endpoints for a single account. |
"Too many concurrent query requests" | You made too many concurrent requests to the /messages and /threads endpoints for a single account. |
Example 429 response body
Nylas indicates what type of rate limit was applied to a request in the body of a 429
error code response, as in the snippet below.
{
'message': 'Too many requests',
'type': 'invalid_request_error'
}