Skip to main content

Error Response Format

All API errors follow a consistent JSON structure:
Fields:
  • code - Machine-readable error code (e.g., invalid_request, rate_limit_exceeded)
  • message - Human-readable error description
  • field - (Optional) The specific field that caused the error

HTTP Status Codes

Common Errors

401 Unauthorized - Missing API Key

Solution: Add your API key to the Authorization header as a Bearer token (e.g., Authorization: Bearer bcy_live_pk_YOUR_API_KEY).

401 Unauthorized - Invalid API Key

Solutions:
  • 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

Solution: Upgrade to a Growth plan ($35/month) or higher.

403 Forbidden - Quota Exceeded

Solutions:

404 Not Found

Solutions:
  • 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

Solutions:
  • Choose a different slug
  • Omit the slug field to auto-generate a random one
  • Check if you already created this link

429 Too Many Requests - Rate Limit Exceeded

Solution: Wait until the rate limit resets (see 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 hour
  • X-RateLimit-Remaining - Requests remaining in current window
  • X-RateLimit-Reset - Unix timestamp when limit resets

Rate Limits by Plan

Handling Rate Limits

Best Practices for Rate Limiting

Check X-RateLimit-Remaining before making requests:
Retry failed requests with increasing delays:
Use bulk endpoints to reduce request count:
  • Use POST /v1/links/bulk instead of multiple single creates
  • Use DELETE /v1/links/bulk for deleting multiple links
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 the field property:
Common validation errors:

Error Logging

Log errors for debugging:

Need Help?

If you encounter persistent errors: