Rate limits
Besday API rate limits: 120 requests and 30 writes per minute per key, the RateLimit headers, and how to back off on 429.
Updated · API version 2026-12-03
Each API key may make 120 requests a minute, of which 30 may change data (POST and DELETE). Past that, the API answers 429 rate_limited.
Rate limit headers#
| Header | Meaning |
|---|---|
RateLimit-Limit | Requests allowed in the current window for this kind of request. |
RateLimit-Remaining | Requests left in the window. |
RateLimit-Reset | Seconds until the window resets. |
Retry-After | On 429 only: seconds to wait before retrying. |
Other limits#
- Messages: 60 an hour per brand, shared with the website’s message box.
- API keys: 10 active per brand. Webhook endpoints: 5 per brand.
- Request bodies: up to 64 KB of JSON.
- List pages:
limitup to 100.
Back off on 429#
async function besday(path, init = {}, tries = 5) {
for (let i = 0; i < tries; i++) {
const res = await fetch(`https://besday.com/api/v1${path}`, {
...init,
headers: { Authorization: `Bearer ${process.env.BESDAY_API_KEY}`, ...init.headers },
});
if (res.status !== 429 && res.status < 500) return res;
const wait = Number(res.headers.get("retry-after")) || 2 ** i;
await new Promise((r) => setTimeout(r, wait * 1000));
}
throw new Error("Besday API unavailable");
}