Error Response Format
All API errors follow a consistent JSON structure:code- Machine-readable error code (e.g.,invalid_request,rate_limit_exceeded)message- Human-readable error descriptionfield- (Optional) The specific field that caused the error
HTTP Status Codes
Common Errors
401 Unauthorized - Missing API Key
Authorization header as a Bearer token (e.g., Authorization: Bearer bcy_live_pk_YOUR_API_KEY).
401 Unauthorized - Invalid API Key
- Verify you’ve copied the full API key correctly
- Check if the key has been revoked in the API Dashboard
- Generate a new API key if needed
403 Forbidden - Plan Upgrade Required
403 Forbidden - Quota Exceeded
- Delete unused links
- Upgrade your plan for higher limits
404 Not Found
- Check that the link ID is correct
- Verify the link hasn’t been deleted
- Ensure you have permission to access this link
409 Conflict - Slug Already Exists
- Choose a different slug
- Omit the
slugfield to auto-generate a random one - Check if you already created this link
429 Too Many Requests - Rate Limit Exceeded
resetAt timestamp) or upgrade your plan.
Rate Limiting
Rate Limit Headers
Every API response includes rate limit information in the headers:X-RateLimit-Limit- Your maximum requests per hourX-RateLimit-Remaining- Requests remaining in current windowX-RateLimit-Reset- Unix timestamp when limit resets
Rate Limits by Plan
Handling Rate Limits
Best Practices for Rate Limiting
Monitor rate limit headers
Monitor rate limit headers
Check
X-RateLimit-Remaining before making requests:Implement exponential backoff
Implement exponential backoff
Retry failed requests with increasing delays:
Batch requests when possible
Batch requests when possible
Use bulk endpoints to reduce request count:
- Use
POST /v1/links/bulkinstead of multiple single creates - Use
DELETE /v1/links/bulkfor deleting multiple links
Cache responses
Cache responses
Cache data that doesn’t change frequently:
Retry Logic
Implement automatic retries for transient errors (500, 502, 503, 504):Validation Errors
Field-specific validation errors include thefield property:
Error Logging
Log errors for debugging:Need Help?
If you encounter persistent errors:- Check the API Status Page
- Review your API Dashboard for usage limits
- Contact support at help.bouncy.ai