Errors
When a HyperRep API request fails, start with the HTTP status code and the detail message in the response body. Those two values usually tell you whether the issue is authentication, validation, a missing resource, or a server-side problem.
Status codes
- Name
200- Description
The request succeeded.
- Name
400- Description
The request was understood, but one of the supplied values was invalid.
- Name
403- Description
The API key is missing, invalid, inactive, or expired.
- Name
404- Description
The requested resource could not be found for the current organization or path.
- Name
422- Description
The request failed validation, such as missing a required query parameter or sending a badly formatted value.
- Name
500- Description
The server could not complete the request.
Error shape
Many API errors return a simple response body. The detail string is the fastest way to understand what to fix.
Example error response
{
"detail": "Invalid organization_id"
}
Common failure cases
- Name
Invalid API Key- Description
The request did not include a usable
X-API-KEYvalue.
- Name
Invalid organization_id- Description
The
organization_idpath value was not valid for the requested route.
- Name
Invalid contact_id- Description
The
contact_idpath value was not valid for the requested route.
- Name
Invalid cursor- Description
The
cursorvalue did not come from a previous API response for that collection.
- Name
start_date must be less than or equal to end_date- Description
The request used a reversed date range.
- Name
start_date and end_date cannot be in the future- Description
The analytics request used future timestamps.
- Name
Conversation not found- Description
The supplied
conversation_iddoes not exist for the current organization.
- Name
Message not found- Description
The supplied
message_iddoes not exist for the current conversation.