Rate Limits

The Brie API enforces per-key rate limits to ensure fair usage. Limits vary by endpoint type:

EndpointLimit
Slices — list, get60 req/min
Slices — create, update, delete10 req/min
Workspaces & Spaces — all60 req/min (read), 10 req/min (write)
Webhooks — list, get, deliveries30 req/min
Webhooks — create, delete, retry, regenerate10 req/min
API Keys — all endpoints10 req/min
Me, Health60 req/min

Rate limit headers

Every response includes these headers:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetSeconds until the limit resets
Retry-AfterSeconds to wait (only on 429 responses)

Workspace quota

Workspace Service Tokens (WST) are subject to a per-workspace quota of 10,000 requests per hour. PAT tokens are exempt from this quota. If exceeded, the API returns 429 with error code WORKSPACE_QUOTA_EXCEEDED.

Handling rate limits

When you receive a 429 Too Many Requests response, wait for the number of seconds indicated by the Retry-After header before retrying.

const response = await fetch(url, { headers });
if (response.status === 429) {
  const retryAfter = parseInt(response.headers.get('Retry-After') || '5');
  await new Promise(r => setTimeout(r, retryAfter * 1000));
  // retry the request
}