Đăng ký quyền truy cập sớm

Nhập tên của bạn cùng email hoặc số điện thoại. Chúng tôi sẽ liên hệ và gửi thông tin truy cập Tajo.

Global Limits

Brevo enforces global rate limits across all API endpoints to ensure fair usage and optimal performance.

Rate Limit Tiers

Free Plan

  • Daily Limit: 300 requests
  • Hourly Limit: 50 requests
  • Burst Limit: 10 requests/minute
  • Email Credits: 300/month

Starter Plan

  • Daily Limit: 20,000 requests
  • Hourly Limit: 1,000 requests
  • Burst Limit: 100 requests/minute
  • Email Credits: Unlimited

Business Plan

  • Daily Limit: 50,000 requests
  • Hourly Limit: 3,000 requests
  • Burst Limit: 300 requests/minute
  • Email Credits: Unlimited

Enterprise Plan

  • Daily Limit: Custom (100,000+)
  • Hourly Limit: Custom (10,000+)
  • Burst Limit: Custom (1,000+/minute)
  • Email Credits: Unlimited

Rate Limit Headers

Every API response includes rate limit information:

HTTP/1.1 200 OK
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200
X-RateLimit-Retry-After: 3600

Header Descriptions

  • X-RateLimit-Limit: Total requests allowed in current window
  • X-RateLimit-Remaining: Requests left in current window
  • X-RateLimit-Reset: Unix timestamp when limit resets
  • X-RateLimit-Retry-After: Seconds to wait before retry

Monitoring Usage

Check Current Usage

const checkRateLimit = async () => {
const response = await fetch('https://api.brevo.com/v3/account', {
headers: { 'api-key': process.env.BREVO_API_KEY }
});
console.log({
limit: response.headers.get('X-RateLimit-Limit'),
remaining: response.headers.get('X-RateLimit-Remaining'),
reset: new Date(response.headers.get('X-RateLimit-Reset') * 1000)
});
};

Dashboard Monitoring

  1. Login to your Brevo dashboard
  2. Navigate to Settings → API Keys
  3. View Usage for each API key
  4. Set Alerts for approaching limits

Rate Limit Reset Windows

  • Daily limits: Reset at 00:00 UTC
  • Hourly limits: Reset every hour at :00 minutes
  • Burst limits: Sliding window (last 60 seconds)

Handling Rate Limits

Exponential Backoff

const makeRequestWithBackoff = async (url, options, maxRetries = 3) => {
for (let i = 0; i < maxRetries; i++) {
try {
const response = await fetch(url, options);
if (response.status === 429) {
const retryAfter = response.headers.get('X-RateLimit-Retry-After') || 60;
const delay = Math.min(1000 * Math.pow(2, i), retryAfter * 1000);
console.log(`Rate limited. Waiting ${delay}ms before retry ${i + 1}`);
await new Promise(resolve => setTimeout(resolve, delay));
continue;
}
return response;
} catch (error) {
if (i === maxRetries - 1) throw error;
}
}
};

Plan Upgrades

When you consistently hit rate limits:

  1. Analyze Usage: Review which endpoints you use most
  2. Optimize Code: Implement caching and batching
  3. Consider Upgrade: Move to higher tier if needed
  4. Contact Sales: For enterprise requirements

Rate Limit Exceptions

Webhook Endpoints

  • Not subject to standard rate limits
  • Separate webhook delivery limits apply

Health Check Endpoint

  • /v3/ping has relaxed limits
  • Designed for monitoring and uptime checks

Batch Operations

  • Count as single request but may have payload limits
  • More efficient than multiple individual requests

Đăng ký quyền truy cập sớm

Nhập tên của bạn cùng email hoặc số điện thoại. Chúng tôi sẽ liên hệ và gửi thông tin truy cập Tajo.

tự động nhận diện
Trợ lý AI

Xin chào! Hãy hỏi tôi về tài liệu.