Limits
Health checks at
/health and /api/v1/health are not limited.
The limit is stored in Redis, so it is shared by every API instance. If Redis is unavailable, each API instance falls back to a single in-memory limit of 20 requests per second per IP address, and the stricter limits above do not apply. Self-hosted installs should keep Redis running.
Response headers
Every limited response includes:When you exceed the limit
The API returns429 Too Many Requests with this body:
retry_after is the number of seconds to wait before trying again: the length of that endpoint’s window.
Retry with backoff
Wait forretry_after seconds, or back off exponentially if it is missing, and add a little random jitter so many clients do not retry at once:
requestId so a retried request cannot send the same message twice. See the quickstart.
Staying under the limit
- Send campaigns to lists from the app, instead of one API call per recipient.
- Cache data that rarely changes, such as templates and lists.
- Spread scheduled jobs out instead of starting them all on the minute.
- Watch
X-RateLimit-Remainingand slow down before it reaches zero.
server/internal/api/middleware/ratelimit.go.