Skip to main content

Build clients that respect throughput and recover gracefully.

Callaro expects enterprise clients to use bounded concurrency, request batching where appropriate, and exponential backoff on transient failures.
curl "https://api.callaro.ai/api/v1/bulk_call_campaigns?page=1&per_page=50"   -H "X-Api-Key: $CALLARO_API_KEY"
async function getWithBackoff(url, attempt = 0) {
  const response = await fetch(url, { headers: { 'X-Api-Key': process.env.CALLARO_API_KEY } });
  if (response.status !== 429) return response;
  const waitMs = Math.min(1000 * 2 ** attempt, 16000);
  await new Promise((resolve) => setTimeout(resolve, waitMs));
  return getWithBackoff(url, attempt + 1);
}