🔨 In Development — This section is still being developed and may change.
POST/v1/cache/invalidate-limits
Invalidate limit caches for organization and API keys.
Use this endpoint when limits are updated directly in the database to ensure the cache reflects the new limits immediately.
Admin only - Requires global admin privileges.
organization_id string required
The organization ID whose limit caches should be invalidated.
api_key_ids array of strings optional
Array of API key IDs to invalidate per-key limit caches. If not provided, only organization-level caches are cleared.
Returns a response with success status and count of caches cleared by type (organization limit, total API key limit, per-key limits).
cURL
- Bash
- Python
- JavaScript
curl -X POST https://api.aitronos.com/v1/cache/invalidate-limits \
-H "X-API-Key: $FREDDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"organization_id": "org_abc123",
"api_key_ids": ["key_xyz789", "key_def456"]
}'{
"success": true,
"message": "Limit caches invalidated successfully",
"caches_cleared": {
"organization_limit": 1,
"total_api_key_limit": 1,
"per_key_limit": 2
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"message": "Admin privileges required",
"status": 403
}
}