Rate Limits
The Brie API enforces per-key rate limits to ensure fair usage. Limits vary by endpoint type:
| Endpoint | Limit |
|---|---|
| Slices — list, get | 60 req/min |
| Slices — create, update, delete | 10 req/min |
| Workspaces & Spaces — all | 60 req/min (read), 10 req/min (write) |
| Webhooks — list, get, deliveries | 30 req/min |
| Webhooks — create, delete, retry, regenerate | 10 req/min |
| API Keys — all endpoints | 10 req/min |
| Me, Health | 60 req/min |
Rate limit headers
Every response includes these headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the window |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Seconds until the limit resets |
Retry-After | Seconds 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
}