MessageOS
API

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:

FieldWhile it is null
limits.requestsPerMinuteOne key can make any number of requests
limits.sendsPerAgentYour agent can send any number of messages
limits.sendsPerContactOne 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.

LimitCounted overPast it, a request answers
limits.requestsPerMinuteEach clock minute, in UTC, for each key429 rate_limited, with a Retry-After header
limits.sendsPerAgentThe last limits.sendsPerAgentWindowSeconds seconds409 blocked with the reason rate_limited_client
limits.sendsPerContactThe last limits.sendsPerContactWindowSeconds seconds409 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.

On this page