Response Structure
All Unifically API responses follow a consistent structure:Success Response
Error Response
Empty arrays and objects are omitted from responses when not needed.
HTTP Status Codes
| Code | Meaning | Description |
|---|---|---|
200 | Success | Task successfully submitted |
400 | Bad Request | Task generation failed |
401 | Unauthorized | Invalid or missing API key |
422 | Validation Error | Invalid request parameters |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Server error occurred |
Error Response Format
When an error occurs, the API returns a simplified structure:Error Response Fields
HTTP status code (200, 400, 401, 422, 429, 500)
Common Error Codes
| Error Code | HTTP Status | Description |
|---|---|---|
validation_error | 422 | Invalid request parameters |
authentication_failed | 401 | Invalid or missing API key |
generation_failed | 400 | Task generation failed |
rate_limit_exceeded | 429 | Too many requests |
internal_error | 500 | Server error |
Example Error Responses
Authentication Failed (401)
Authentication Failed (401)
Rate Limit Exceeded (429)
Rate Limit Exceeded (429)
Validation Error (422)
Validation Error (422)
Generation Failed (400)
Generation Failed (400)
Server Error (500)
Server Error (500)
Best Practices
Always Check Response Code
Check the
code field in every response to determine success or failureImplement Retry Logic
Retry failed requests with exponential backoff for 429 and 500 errors
Log Errors
Log all error responses including the error code and message for debugging
Handle Rate Limits
Implement rate limit handling to avoid 429 errors
