Aprender

Límites de tarifas y cuotas

Cuánto puedes enviar y cómo mantenerte dentro de los límites.

LímitePlan gratuito
Emails por mes3,000
Emails por día100
Solicitudes por segundo10 por espacio de trabajo
Destinatarios por correo electrónico50

Encabezados de respuesta

EncabezadoSignificado
X-RateLimit-LimitSolicitudes permitidas por segundo
X-RateLimit-RemainingSolicitudes que quedan en el segundo actual
Reintentar despuésSegundos para esperar, enviados con cada 429

Retrayendo

1async function send(body, attempt = 0) {
2  const res = await fetch("https://sendtern.com/emails", { method: "POST", headers, body });
3  if (res.status === 429 && attempt < 5) {
4    const wait = Number(res.headers.get("Retry-After") || 2 ** attempt);
5    await new Promise((r) => setTimeout(r, wait * 1000));
6    return send(body, attempt + 1);
7  }
8  return res.json();
9}

Las cuotas diarias y mensuales se restablecen a las 00:00 UTC.Cuando se agota una cuota, sends devuelve 429 con daily_quota_exceeded o monthly_quota_exceeded.