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
| Status Code | Description |
|---|---|
200 OK | Request successful |
201 Created | Resource created successfully |
400 Bad Request | Invalid request parameters |
401 Unauthorized | Missing or invalid API key |
403 Forbidden | Insufficient permissions or quota exceeded |
404 Not Found | Resource not found |
409 Conflict | Resource conflict (e.g., slug already exists) |
429 Too Many Requests | Rate limit exceeded |
500 Internal Server Error | Server error (contact support if persists) |
Common Errors
401 Unauthorized - Missing API Key
X-Api-Key header.
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
| Plan | Requests/Hour | Requests/Day |
|---|---|---|
| Growth | 1,000 | 10,000 |
| Scaling | 5,000 | 50,000 |
| Dominance | 10,000 | 100,000 |
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 Code | Description |
|---|---|
missing_required_field | Required field is missing |
invalid_url | URL is not a valid HTTP/HTTPS URL |
invalid_slug | Slug contains invalid characters |
invalid_email | Email address is invalid |
value_too_long | Field value exceeds maximum length |
value_too_short | Field value is below minimum length |
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