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
Error Response Format
When an error occurs, the API returns a simplified structure:Response Fields
boolean
Indicates whether the request was successful (
true) or failed (false)integer
HTTP status code (200, 400, 401, 422, 429, 500)
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 Success Field
Check the
success 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 message for debugging
Handle Rate Limits
Implement rate limit handling to avoid 429 errors
