Rate Limits

Revolt uses a fixed-window ratelimiting algorithm:

  • You are given a set amount of calls per each named bucket.
  • Any calls past this limit will result in 429 errors.
  • Buckets are replenished after 10 seconds from initial request.

Buckets

There are distinct buckets that you may be calling against, none of these affect each other and can be used up independently of one another.

MethodPathLimit
/users20
PATCH/users/:id2
/users/:id/default_avatar255
/bots10
/channels15
POST/channels/:id/messages10
/servers5
/auth3
DELETE/auth255
/safety15
/safety/report3
/swagger100
/*20

Headers

There are multiple headers you can use to figure out when you can and cannot send requests, and to determine when you can next send a request.

HeaderTypeDescription
X-RateLimit-LimitnumberMaximum number of calls allowed for this bucket.
X-RateLimit-BucketstringUnique identifier for this bucket.
X-RateLimit-RemainingnumberRemaining number of calls left for this bucket.
X-RateLimit-Reset-AfternumberMilliseconds left until calls are replenished.

Rate Limited Response

When you receive 429 Too Many Requests, you will also receive a JSON body with the schema:

interface Response {
  // Milliseconds until calls are replenished
  retry_after: number;
}