# Límites de tarifas y cuotas

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

| Límite | Plan gratuito |
| --- | --- |
| Emails por mes | 3,000 |
| Emails por día | 100 |
| Solicitudes por segundo | 10 por espacio de trabajo |
| Destinatarios por correo electrónico | 50 |

## Encabezados de respuesta

| Encabezado | Significado |
| --- | --- |
| X-RateLimit-Limit | Solicitudes permitidas por segundo |
| X-RateLimit-Remaining | Solicitudes que quedan en el segundo actual |
| Reintentar después | Segundos para esperar, enviados con cada 429 |

## Retrayendo

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

> **note:** 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`.
