Back to guides

Rate Limiting

API request limits and best practices

The Revuloop API uses rate limiting to ensure fair usage and protect service stability. Rate limits vary by subscription plan and are applied per API key. Limits range from 60 requests/min on Free to 1,000 requests/min on Business plans.

View rate limits by plan, headers, and error formats in the API Reference

Implementing Exponential Backoff

When you receive a 429 Too Many Requests response, use exponential backoff with jitter to retry gracefully. Always respect the Retry-After header value.

async function apiRequestWithRetry(url, options, maxRetries = 3) {
  let retries = 0;

  while (retries < maxRetries) {
    const response = await fetch(url, options);

    if (response.status === 429) {
      const retryAfter = parseInt(response.headers.get('Retry-After') || '60');
      const jitter = Math.random() * 1000;  // Add randomness to prevent thundering herd
      const delay = (retryAfter * 1000) + jitter;

      console.log(`Rate limited. Retrying in ${delay}ms...`);
      await new Promise(resolve => setTimeout(resolve, delay));
      retries++;
      continue;
    }

    return response;
  }

  throw new Error('Max retries exceeded');
}

// Usage
const response = await apiRequestWithRetry(
  'https://revuloop.com/api/v1/surveys',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    }
  }
);

Best Practices

Monitor rate limit headers

Track X-RateLimit-Remaining and slow down before hitting the limit. Implement proactive throttling when remaining drops below 20%.

Use batch endpoints

Instead of making individual requests, use bulk endpoints like /respondents/sync or /responses/export to reduce total API calls.

Cache responses locally

Cache survey definitions and templates locally. These rarely change and don't need to be fetched on every request.

Use webhooks for real-time data

Instead of polling for new responses, set up webhooks to receive real-time notifications when events occur.

Implement request queuing

For high-volume applications, implement a request queue that automatically throttles outgoing requests to stay within limits.

Requesting Higher Limits

Need higher rate limits?

If your application requires higher rate limits than your current plan provides, contact our team to discuss your needs. Enterprise customers can receive custom limits.

Contact Sales