Working with the API

Rate limits

How many requests your keys may make, and what happens past it.

Your workspace's API keys share one limit: 600 requests a minute, unless we have set another for you. The dashboard does not count against it.

Past the limit the answer is 429 with a Retry-After header, in seconds:

{
  "code": "rate_limited",
  "message": "this workspace made more API requests than its limit allows in a minute; retry after Retry-After seconds",
  "error": {
    "type": "rate_limited",
    "code": "rate_limited",
    "retryable": true,
    "request_id": "23f0e2f26a90ddf6424556cd0ad15f4a"
  }
}

Wait the seconds Retry-After gives, then retry. A send retried with its Idempotency-Key is never sent twice.

Sending to many people

One POST /v1/messages reaches up to 1,000 numbers, and counts as one request. For more, or for a send on a schedule, use a campaign.

One-time codes

Codes have limits of their own, on top of the request limit:

LimitAnswer
One channel, again30 seconds apart429 resend_too_soon
One number5 codes an hour, 10 a day429 too_many_codes
One key300 codes an hour, 2,000 a day429 otp_limit_reached
One workspaceits plan's hourly and daily caps429 otp_limit_reached

On this page