Skip to content
Reeflow
Start Building

Quotas

Reeflow APIs use quotas to limit the number of resources you can create per organization.

These limits protect service stability, ensure fair usage across all customers, and prevent accidental resource proliferation.

Quotas are organization-level limits on the number of specific resources you can create through the API or the Console.

Each quota is applied independently—for example, having 20 API keys doesn’t affect your ability to create database connections.

The key characteristics of quotas are:

  • Organization-scoped: Quotas apply to your entire organization, not individual users
  • Resource-specific: Each resource type has its own quota limit
  • Creation-only: Quotas only restrict creating new resources, not reading, updating, or deleting existing ones
  • Real-time enforcement: Quota checks happen instantly when you attempt to create resources

Quotas serve multiple important purposes:

  • Service Stability: Large numbers of resources can impact system performance. Quotas ensure that database queries, connection pools, and other system resources remain responsive for all customers.
  • Cost Protection: Creating excessive resources could lead to unexpected usage charges. Quotas act as a safety net to prevent accidental runaway resource creation.
  • Security: Quotas limit the potential damage from compromised API keys or runaway automation scripts, protecting both your account and the broader Reeflow platform.
  • Fair Usage: By preventing any single organization from consuming excessive resources, quotas help ensure reliable service for all Reeflow customers.

Quotas are enforced only when creating new resources via POST requests. When you attempt to create a resource that would exceed your quota limit, the API returns a 403 Forbidden error.

Example quota exceeded response:

{
"statusCode": 403,
"message": "Quota exceeded: maximum 20 api-keys allowed per organization (currently: 20)"
}

All API responses from endpoints with quotas include three headers that show your current quota status:

X-Quota-Limit: 20
X-Quota-Used: 15
X-Quota-Remaining: 5

These headers appear on all HTTP methods (GET, POST, PATCH, DELETE), giving you visibility into your quota status even when just reading data.

The /quotas endpoint provides complete quota information for all resource types in your organization:

GET /quotas HTTP/1.1
Host: api.reeflow.com
Authorization: Basic <credentials>

Response:

{
"data": [
{
"api-keys": {
"limit": 20,
"used": 15,
"remaining": 5
},
"connections": {
"limit": 10,
"used": 3,
"remaining": 7
},
"teams": {
"limit": 20,
"used": 8,
"remaining": 12
}
}
],
"total": 1,
"page": 1,
"limit": 1,
"pages": 1
}

Different resource types have different quota limits based on their typical usage patterns and system impact:

Resource TypeQuota Purpose
API KeysLimit authentication credentials for security
Database ConnectionsPrevent system overload from too many connections
TeamsControl organization structure complexity

Check the quota headers in your API responses or call the /quotas endpoint regularly to track your resource usage and plan accordingly.

// Check quota status before creating resources
const quotaResponse = await fetch('https://api.reeflow.com/quotas', {
headers: {
Authorization: `Basic ${credentials}`,
},
});
const quotaData = await quotaResponse.json();
const apiKeyQuota = quotaData.data[0]['api-keys'];
if (apiKeyQuota.remaining > 0) {
// Safe to create a new API key
await createApiKey(newKeyData);
} else {
console.warn('API key quota exceeded');
}

Always implement proper error handling for quota exceeded responses:

try {
const response = await fetch('https://api.reeflow.com/api-keys', {
method: 'POST',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(newApiKeyData),
});
if (response.status === 403) {
const error = await response.json();
if (error.message.includes('Quota exceeded')) {
// Handle quota exceeded specifically
console.error('Cannot create API key: quota limit reached');
// Maybe prompt user to delete unused keys
return;
}
}
const apiKey = await response.json();
console.log('API key created:', apiKey.id);
} catch (error) {
console.error('Failed to create API key:', error);
}

Regularly review and delete resources you no longer need to stay within quota limits and maintain good organization hygiene.

If you’re approaching quota limits, plan your resource usage carefully. Consider whether you really need all existing resources or if some can be consolidated or removed.

Quotas are different from rate limits:

AspectQuotasRate Limits
What they limitTotal number of resources you can createNumber of requests per time period
ScopeOrganization-wide resource countsAPI request frequency
Reset behaviorOnly decrease when you delete resourcesReset automatically after time window
HTTP status403 Forbidden when exceeded429 Too Many Requests when exceeded
PurposePrevent resource proliferationPrevent API abuse and ensure fair access