Zavu implements rate limiting to ensure fair usage and protect the platform from abuse. All API requests to /v1/* endpoints are subject to rate limiting.
Submit your business information and use case in the dashboard under Settings > Compliance. Once verified, your limit automatically increases to 1,200 requests/min (2x).
2
Register for 10DLC (US Numbers)
If you’re sending SMS to US recipients, register your brand and campaign for 10DLC compliance. Approved campaigns receive 2,400 requests/min (4x).
Verification is automatic - once approved, your rate limit increases immediately with no code changes needed.
Use .withResponse() to access the rate limit headers:
Copy
import Zavudev from '@zavudev/sdk';const zavu = new Zavudev({ apiKey: process.env['ZAVUDEV_API_KEY'],});// Use .withResponse() to get the full HTTP responseconst { response, result } = await zavu.messages.send.withResponse({ to: "+14155551234", text: "Hello from Zavu!",});// Access rate limit headersconst limit = response.headers.get("X-RateLimit-Limit");const remaining = response.headers.get("X-RateLimit-Remaining");const reset = response.headers.get("X-RateLimit-Reset");console.log(`Rate limit: ${remaining}/${limit} requests remaining`);console.log(`Window resets at: ${new Date(Number(reset)).toISOString()}`);// Access the message result as usualconsole.log("Message ID:", result.message.id);
For sending many messages, implement a simple rate limiter:
Copy
import Zavudev from '@zavudev/sdk';const zavu = new Zavudev({ apiKey: process.env['ZAVUDEV_API_KEY'],});async function sendBulkMessages(messages: { to: string; text: string }[]) { const results = []; let remaining = 600; for (const msg of messages) { // If running low, wait for next window if (remaining < 10) { console.log("Approaching rate limit, waiting for next window..."); await new Promise(resolve => setTimeout(resolve, 60000)); remaining = 600; } const { response, result } = await zavu.messages.send.withResponse(msg); remaining = Number(response.headers.get("X-RateLimit-Remaining")); results.push(result); } return results;}
For sending to more than 100 recipients, we strongly recommend using the Broadcasts API instead. Broadcasts handle rate limiting, retries, and progress tracking automatically.