Rate limits
How many requests you can make, and what to do when you hit a limit.
| Limit | Default | Applies to |
|---|---|---|
| Per key | 600 requests / minute | Each API key |
| Per workspace | Route budgets, e.g. searches 300/min, analytics 300/min, campaign preview 300/min, test emails 30/min | Costly routes, shared by every key and member of the workspace |
| Per IP address | 1,200 requests / minute | All API traffic, counted before authentication |
| Failed authentication | 50 / 10 minutes per IP address | Unknown, revoked or expired keys. Further requests from that IP answer 429 until the window ends |
If your integration needs a higher per-key limit, contact support.
Headers
Every response to a key carries:
| Header | Meaning |
|---|---|
x-ratelimit-limit | Requests allowed per window for this key |
x-ratelimit-remaining | Requests left in the current window |
x-ratelimit-reset | Seconds until the window resets |
When you hit a limit
The API answers 429 with code RATE_LIMITED, a retry-after header (seconds) and
details.retryAfterSeconds. Wait that long before retrying:
async function coldvenue(url, init = {}, attempts = 3) {
for (let attempt = 1; ; attempt++) {
const response = await fetch(url, {
...init,
headers: { ...init.headers, Authorization: `Bearer ${process.env.COLDVENUE_API_KEY}` },
});
if (response.status !== 429 || attempt === attempts) return response;
const seconds = Number(response.headers.get('retry-after') ?? 1);
await new Promise((resolve) => setTimeout(resolve, seconds * 1000));
}
}A key that keeps failing authentication (for example after it was revoked) also blocks other
requests from the same IP address for a while. Stop retrying on 401.