Error Handling
The Heify API uses standard HTTP status codes to indicate the success or failure of requests. This guide explains how to handle errors effectively.HTTP Status Codes
| Status Code | Meaning | Description |
|---|---|---|
200 OK | Success | Request completed successfully |
201 Created | Resource Created | New resource created successfully (e.g., configuration) |
400 Bad Request | Client Error | Invalid request format or parameters |
403 Forbidden | Authentication Failed | Invalid or missing API key |
404 Not Found | Resource Not Found | Requested resource doesn’t exist |
429 Too Many Requests | Rate Limit Exceeded | Too many requests in a short period |
500 Internal Server Error | Server Error | Unexpected error on Heify servers |
Error Response Format
All error responses follow a consistent JSON structure:Example Error Response
Common Errors by Status Code
400 Bad Request
The most common error type. Occurs when the request is malformed or contains invalid parameters.Common Causes
Missing required fields
Missing required fields
Error:
"Missing required field: configuration_id"Solution: Ensure all required parameters are included in the request body.Invalid JSON format
Invalid JSON format
Error:
"Invalid JSON format"Solution: Validate your JSON before sending. Common issues:- Missing commas between fields
- Trailing commas
- Unescaped quotes in strings
Resource not found
Resource not found
Error:
"Configuration not found"Solution: Verify the resource ID exists and belongs to your account:Invalid audio format
Invalid audio format
Error:
"Unsupported audio format"Solution: Ensure your audio file is in a supported format:- Supported:
aac,aiff,amr,asf,flac,mp3,ogg,wav,webm,m4a,mp4 - Max size: 200 MB
- Max duration: 2 hours (7200 seconds)
Invalid group value
Invalid group value
Error:
"Invalid group value"Solution: Use only allowed group values:PENDING_REVIEWUNDER_REVIEWARCHIVED""(empty string to remove group)
Exceeded configuration limit
Exceeded configuration limit
Error:
"Maximum of 20 configurations per client exceeded"Solution: Delete unused configurations before creating new ones:Solutions
1
Verify account status
Check your account status and available resources in your Heify Dashboard
2
Contact support
If you believe this is an error, contact Heify support for assistance
403 Forbidden
Authentication failed. Your API key is invalid, missing, or inactive.Common Causes
| Cause | Solution |
|---|---|
Missing x-api-key header | Add the header to your request |
| Invalid API key | Verify the key in your dashboard |
| Deactivated API key | Generate a new key |
| Wrong header name | Use x-api-key, not Authorization |
Example Fix
404 Not Found
The requested resource doesn’t exist or the endpoint URL is incorrect.Error Example
Common Causes
- Typo in endpoint URL
- Using GET instead of POST
- Incorrect base URL
Solution
Verify the endpoint:| Correct | Incorrect |
|---|---|
POST https://api.heify.com/details | GET https://api.heify.com/details |
POST https://api.heify.com/submit | POST https://api.heify.com/submits |
429 Too Many Requests
You’ve exceeded the rate limit for the endpoint.Solutions
Implement exponential backoff
Implement exponential backoff
Python
Respect rate limits
Respect rate limits
See the Rate Limits documentation for endpoint-specific limits.
500 Internal Server Error
An unexpected error occurred on Heify’s servers.What to Do
1
Retry the request
The error may be temporary. Wait a few seconds and try again.
2
Contact support
If the issue persists, contact hola@heify.com or in the contact page.