Rate limits
The webhook endpoint enforces a sliding-window rate limit per workspace token to protect service quality for all users.
The webhook endpoint enforces a sliding-window rate limit per workspace token to protect service quality for all users.
| Endpoint | Limit | Window | Scope |
|---|---|---|---|
POST /api/logs | 60 requests | 1 minute | Per workspace token |
When the limit is exceeded the API returns 429 Too Many Requests with a
Retry-After: 60 header indicating how many seconds to wait before retrying. The
limit is enforced globally across all server instances using a sliding-window
algorithm. It is not per-server.
HTTP/1.1 429 Too Many Requests
Retry-After: 60
Content-Type: application/json
{
"error": "Too many requests. Please slow down and try again shortly."
}Retry pattern
async function sendWithRetry(payload, token) {
for (let attempt = 0; attempt < 4; attempt++) {
const res = await fetch("https://tracira.com/api/logs", {
method: "POST",
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
if (res.status !== 429) return res;
const retryAfter = Number(res.headers.get("Retry-After") ?? 60);
await new Promise((r) => setTimeout(r, retryAfter * 1000));
}
throw new Error("Rate limit exceeded after retries");
}Tip
For high-throughput pipelines, omit sync: true so requests return immediately with
status: "pending". Sync evaluation holds the connection open and counts against the
same limit.