Skip to Content
Sendable Docs

Rate Limits

Request limits per API key, per-session send pacing, and how to handle 429 responses.

Sendable has two separate limits:

  1. A request limit per API key for every /v1 route.
  2. A send policy per WhatsApp session that paces outgoing messages to protect the number from WhatsApp bans.

Both answer 429 Too Many Requests with a Retry-After header (seconds) when you need to slow down.

Request limit per API key

Each API key may make 500 requests per hour. The window starts with the key's first request and resets one hour later, whatever the traffic in between. Limits do not depend on the plan. Self-hosted servers can change them with API_RATE_LIMIT_MAX and API_RATE_LIMIT_WINDOW_SECONDS.

Every response to an authenticated request carries the current state:

RateLimit-Limit: 500
RateLimit-Remaining: 499
RateLimit-Reset: 3600
RateLimit-Policy: 500;w=3600
HeaderDescription
RateLimit-LimitRequests allowed per window
RateLimit-RemainingRequests left in the current window
RateLimit-ResetSeconds until the window resets
RateLimit-PolicyThe policy as <limit>;w=<window seconds>

The names follow the IETF RateLimit header draft. There are no X-RateLimit-* headers. Browsers can read all of these headers (they are listed in Access-Control-Expose-Headers).

When the key is exhausted, the response is 429 with Retry-After and a JSON body:

HTTP/1.1 429 Too Many Requests
Retry-After: 1260
RateLimit-Limit: 500
RateLimit-Remaining: 0
RateLimit-Reset: 1260
Content-Type: application/json

{ "error": "rate_limited", "message": "api key rate limit exceeded", "retryAfter": 1260 }

Requests with a missing or invalid key get 401 and do not count against any limit.

Send policy per WhatsApp session

Sending through POST /v1/message/send is paced per WhatsApp session. You configure the policy in the dashboard under the session's settings.

RuleDefaultSync send (async unset or false)Async send ("async": true)
Gap between sends5 s, plus up to 2 s random jitterwaits for the next slot, up to 60 s, then 429queued with a delay
Warm-up after linking a number24 h: 30 s gap, at most 50 sends per daysame as abovesame as above
Daily send capnone429 until the next day (session timezone)queued until the next day
Quiet hoursnone429 until quiet hours endqueued until quiet hours end
Sending paused (manually or after a connection failure)off429, Retry-After: 60429, Retry-After: 60

These 429 responses carry Retry-After and a plain-text body such as quiet hours, retry in 1800 seconds. They do not carry RateLimit-* headers for the send policy (the RateLimit-* headers on them describe the request limit).

Handling 429

  • Wait for Retry-After seconds before retrying. Do not retry in a tight loop.
  • Watch RateLimit-Remaining and slow down before it reaches 0.
  • Send an Idempotency-Key with POST /v1/message/send so a retry can never send the same message twice. See API Reference.
  • For bulk sends, use "async": true. The queue applies the send policy for you instead of rejecting requests.
async function withRetry<T>(fn: () => Promise<Response>, retries = 3) {
  for (let attempt = 0; ; attempt++) {
    const res = await fn()
    if (res.status !== 429 || attempt >= retries) return res
    const retryAfter = Number(res.headers.get('retry-after') ?? '1')
    await new Promise((r) => setTimeout(r, retryAfter * 1000))
  }
}

const res = await withRetry(() =>
  fetch('https://api.sendable.dev/v1/message/send', {
    method: 'POST',
    headers: {
      'x-api-key': process.env.SENDABLE_API_KEY!,
      'content-type': 'application/json',
      'Idempotency-Key': 'order-123-notify',
    },
    body: JSON.stringify({
      chatId: '[email protected]',
      text: { content: 'Your order has shipped' },
    }),
  }),
)

On this page