Authentication & Rate Limiting
Authentication
All Public API requests require an API key passed in the X-API-Key header.
curl -H "X-API-Key: your-api-key" \
-H "X-Delightable-Client-Uuid: your-client-uuid" \
https://api.fishbowl.com/api/public/brandAPI Key Properties
Each API key has:
- A Client scope (required) — determines which client's data you can access
- An optional Brand scope — restricts access to a specific brand
- An optional Store scope — restricts access to a specific store
- An optional expiration date — after which the key is no longer valid
Verifying Your Key
Use the Verify API Access endpoint to confirm your key is valid and see which Client it's associated with:
curl -H "X-API-Key: your-api-key" \
https://api.fishbowl.com/api/public/request/accessRate Limiting
The API uses a token bucket rate limiting system per API key.
How It Works
| Setting | Value |
|---|---|
| Bucket capacity | 500 tokens |
| Refill rate | 100 tokens every 15 minutes |
| Refill interval | 15 minutes |
Each API request consumes tokens from your bucket based on the endpoint's cost:
| Cost Level | Tokens | Used For |
|---|---|---|
| Free | 0 | Rate limit checks, subscription creates |
| Standard | 1 | Most GET/POST/PUT/DELETE operations |
| Heavy | 2 | Bulk operations, complex queries |
Rate Limit Headers
Every response includes rate limit information in the headers:
X-RateLimit-Limit: 500 # Total bucket capacity
X-RateLimit-Remaining: 497 # Tokens remaining
X-RateLimit-Reset: 1672617900 # Unix timestamp of next refillChecking Your Limit
Use the Check Rate Limit endpoint to see your current rate limit status without consuming any tokens:
curl -H "X-API-Key: your-api-key" \
-H "X-Delightable-Client-Uuid: your-client-uuid" \
https://api.fishbowl.com/api/public/request/limitResponse:
{
"success": true,
"data": {
"type": "rateLimit",
"attributes": {
"remainingTokens": 497,
"retryAfter": 1672617900,
"tokenLimit": 500
}
}
}When You're Rate Limited
If you exceed the rate limit, you'll receive a 429 Too Many Requests response:
{
"success": false,
"message": "Too Many Requests",
"error_code": 429
}With headers:
HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 500
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1672617900
Retry-After: 1672617900Use the Retry-After header (Unix timestamp) to determine when to retry your request.
Best Practices
- Monitor headers — check
X-RateLimit-Remainingin every response - Implement backoff — when you receive a 429, wait until
Retry-Afterbefore retrying - Use caching — many GET endpoints return cached responses (indicated by
cache_hit: true), so you don't need to poll frequently - Batch when possible — use batch endpoints (like
/api/public/subscription/batch) to process multiple items in one request