Skip to main content

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)
object
Response data or error details
string
Human-readable error message (on error)

Example Error Responses

Solution: Verify your API key is correct and properly formatted in the Authorization header:
Solution: Implement exponential backoff and respect rate limits
Solution: Check the API documentation for required parameters and valid values
Solution: Review your request parameters and try again
Solution: Retry the request after a brief delay. Contact support if the issue persists

Best Practices

Always Check Success Field

Check the success field in every response to determine success or failure

Implement 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
Always parse the error.message field to provide helpful feedback to your users
Never expose your API key in client-side code or public repositories