Rate Limits

The Storeep API enforces rate limits per access token to ensure fair usage and service stability.

Limits

MetricLimit
Requests per minute60 per token
Window duration60 seconds (sliding window)
Rate limits are enforced per token, not per store. If you have multiple tokens, each has its own independent rate limit.

Rate Limit Exceeded

When you exceed the rate limit, the API returns a 429 Too Many Requests response:

429 Too Many Requests
{
    "status": "error",
    "errors": [
        "rate limit exceeded, try again later"
    ]
}

How the Window Works

  1. The window starts with your first request and lasts 60 seconds.
  2. Each request within the window increments the counter.
  3. When the counter reaches 60, subsequent requests are rejected with 429.
  4. After the 60-second window expires, the counter resets and a new window begins.

Handling Rate Limits

Implement these patterns to avoid hitting rate limits:

Exponential Backoff

When you receive a 429 response, wait before retrying. Increase the wait time with each retry.

JavaScript
async function fetchWithRetry (url, options, retries = 3)
{
    for (let i = 0; i < retries; i++)
    {
        const response = await fetch(url, options);

        if (response.status !== 429) return response;

        // wait 2^i seconds before retrying
        await new Promise(r => setTimeout(r, Math.pow(2, i) * 1000));
    }

    throw new Error("Rate limit exceeded after retries");
}

Request Batching

Instead of making many individual requests, use pagination efficiently:

Multiple Tokens

For high-throughput integrations, create multiple tokens and distribute requests across them. Each token has an independent 60 req/min limit.