Rules
RateLimit-Limit,RateLimit-RemainingandRateLimit-Reset(seconds) come with every answer.- Over the limit, the API answers
429with typerate_limited, aRetry-Afterheader anderror.retry_afterin seconds. Wait that long, then retry with the same idempotency key. - The TypeScript SDK retries
429and5xxanswers for you (2 retries by default,maxRetriesto change it), honouringRetry-After. - Each sender also has a sending rate (pacing). The send gate lets a sender send only so many messages a second; a send over it is also refused with
429 rate_limited,Retry-Afteranderror.retry_after, anderror.sendernames the sender. Retry the same way, with the same idempotency key. TheRateLimit-*headers describe only the per-key limit. - New-contact budgets are separate. How many new conversations a sender may start is decided by the send gate (
new_contact_limit,sender_throttled), not by these headers. - Use webhooks or the live stream instead of polling
GET /v1/eventsin a tight loop.