Resource limits
Learn about resource limits in Masivo and how it applies to different environments and endpoints
API Overview
Masivo implements rate limiting to ensure a stable and reliable API service for all customers. Rate limiting prevents abuse, guarantees fair usage, and helps maintain overall platform performance.
There are two main rate limiters in place:
- General Rate Limiter: Applies to all endpoints, protecting the system from excessive traffic and potential misuse.
- Migration Rate Limiter: Specifically applies to migration endpoints, which often handle large batch operations. This limiter ensures that migration processes do not overwhelm the system and are executed in a controlled manner.
Environment Differences
Every new account starts as a DEV account, which comes with certain limitations. In this environment, users can perform their integration tests for free. Once testing is complete, they can switch to PROD, keeping in mind that Masivo will start accumulating usage.
To switch to PROD, please contact the support team.
Below is a comparison of the rate limits for both environments:
Environment | General Rate Limiter | Migration Rate Limiter |
---|---|---|
Dev | 1000 request per day | 1 request every 5 seconds & up to 250 requests per hour |
Prod | Unlimited requests | 1 request every 5 seconds & up to 1000 requests per hour |
Adjusting Your Requests
If you experience throttling or delays due to rate limits, consider spread out your API calls over time rather than sending a burst of requests all at once
Regularly monitor your request usage and adjust your application logic accordingly to avoid reaching the rate limits.
Rate Limit Headers
When making requests to the API, you’ll receive the following headers in the response that provide information about your current rate limit status:
Header Name | Description |
---|---|
X-RateLimit-Limit | The maximum number of requests you’re permitted to make in the current limit window |
X-RateLimit-Remaining | The number of requests remaining in the current rate limit window |
X-RateLimit-Reset | The time in seconds until the current rate limit window resets |
Retry-After | The time in seconds to wait before making another request (only present on 429 responses) |
When you exceed the rate limit, you’ll receive a 429 Too Many Requests
response code. In this case, the Retry-After
header will indicate how long you should wait before retrying your request.
General limits
Entity | Max Amount |
---|---|
Brands | 200 |
Campaigns | 1000 |
Channels | 50 |
Custom Event Types | 50 |
Event Tags | 50 |
Products | 1000 |
Rewards | 1000 |
Stores | 1000 |
Tiers | 10 |