Error Response Format
All API errors follow a consistent JSON structure:HTTP Status Codes
The API uses standard HTTP status codes to indicate the success or failure of requests:Request succeeded
Resource created successfully
Invalid request parameters or payload
Missing or invalid API key
Insufficient permissions for the requested action
Requested resource does not exist
Resource already exists (e.g., duplicate link code)
Request payload validation failed
Rate limit exceeded
Unexpected server error
Common Error Codes
Authentication Errors
The provided API key is missing, malformed, or invalid
The API key has expired and needs to be regenerated
The API key does not have permission to perform this action
Validation Errors
Request payload failed validation. Check the
details field for specific issues.Query parameters are invalid or out of acceptable range
A required field is missing from the request payload
Resource Errors
The requested link does not exist or you don’t have access to it
A link with the specified code already exists
The link has expired and is no longer accessible
Rate Limiting
You have exceeded your API rate limit. Wait before making more requests.
Subscription Errors
An active subscription is required to perform this action
You have reached your subscription’s usage limits
Payment is required to continue using the service
Error Handling Best Practices
1. Check the success Field
Always check the success field in the response to determine if the request was successful:
2. Handle Specific Error Codes
Different error codes may require different handling strategies:3. Implement Retry Logic
For transient errors (5xx status codes, rate limits), implement retry logic with exponential backoff:4. Log Errors for Debugging
Always log errors with sufficient context for debugging:Rate Limiting Details
When you exceed your rate limit, the API returns a429 status code with additional headers:
X-RateLimit-Limit: Your rate limit per hourX-RateLimit-Remaining: Remaining requests in current windowX-RateLimit-Reset: Unix timestamp when the rate limit resets