Rate limits
MessageOS does not cap how many messages you send or how many requests you make. Where to read that for your key, and what a limit does if one is ever set.
MessageOS does not cap how many messages you send or how many requests you make.
GET /v1/whoami shows this for your key under limits. Each limit is null while none is set, and then no send is blocked for volume and no request is refused for rate:
| Field | While it is null |
|---|---|
limits.requestsPerMinute | One key can make any number of requests |
limits.sendsPerAgent | Your agent can send any number of messages |
limits.sendsPerContact | One person can be sent any number of messages |
Any valid key can call whoami. The other rules for a send still apply. Errors lists every reason a send can be blocked for.
If MessageOS ever sets a limit
The number appears in limits in place of null. Read it there instead of keeping a figure of your own.
| Limit | Counted over | Past it, a request answers |
|---|---|---|
limits.requestsPerMinute | Each clock minute, in UTC, for each key | 429 rate_limited, with a Retry-After header |
limits.sendsPerAgent | The last limits.sendsPerAgentWindowSeconds seconds | 409 blocked with the reason rate_limited_client |
limits.sendsPerContact | The last limits.sendsPerContactWindowSeconds seconds | 409 blocked with the reason rate_limited_contact |
Retry-After is the number of seconds until the next minute starts. Wait that long, then send the same request again.
A message you send through the API counts toward a send limit once it is sent, a reply sent with inReplyTo included, and so does a message sent from the dashboard. A blocked send does not count. A blocked answer is kept for the Idempotency-Key, so send again later with a new key.
The two window fields are always numbers. They limit nothing while their limit is null.
