fishbowlAPI API

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/brand

API Key Properties

Each API key has:

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/access

Rate Limiting

The API uses a token bucket rate limiting system per API key.

How It Works

SettingValue
Bucket capacity500 tokens
Refill rate100 tokens every 15 minutes
Refill interval15 minutes

Each API request consumes tokens from your bucket based on the endpoint's cost:

Cost LevelTokensUsed For
Free0Rate limit checks, subscription creates
Standard1Most GET/POST/PUT/DELETE operations
Heavy2Bulk 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 refill

Checking 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/limit

Response:

{
  "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: 1672617900

Use the Retry-After header (Unix timestamp) to determine when to retry your request.

Best Practices

  1. Monitor headers — check X-RateLimit-Remaining in every response
  2. Implement backoff — when you receive a 429, wait until Retry-After before retrying
  3. Use caching — many GET endpoints return cached responses (indicated by cache_hit: true), so you don't need to poll frequently
  4. Batch when possible — use batch endpoints (like /api/public/subscription/batch) to process multiple items in one request