Error Codes

Error Codes AI Tools

Open in ChatGPT

Open in ChatGPT to ask questions about this page

Open in Claude

Open in Claude to ask questions about this page

Copy as Markdown

Copy this page as markdown to use with AI assistants

View as Markdown

Open this page as markdown in a new tab

Arattai uses HTTP status codes to indicate the success or failure of an API call. Status codes in the 2xx range indicate success, 4xx codes indicate client-side errors due to invalid or missing request information, and 5xx codes indicate server-side errors.

The table below covers error codes specific to the Conversational Messaging APIs - Display Messages and Input Messages.

Endpoint Status Reason Sample Error Response
/api/v1/messages 400 The 48-hour messaging window has expired, as the user did not respond within 48 hours of the last message sent via the Message API.
{
  "message": "Business-initiated messages are not allowed because the user has not sent any message within the last 48 hours.",
  "code": "business_message_window_expired"
}
/api/v1/messages 400 Required input parameter is missing from the request.
{
  "message": "The parameter '$param_name' is missing.",
  "code": "param_missing"
}
/api/v1/messages 400 Malformed field, or Arattai rejected the payload. Also returned when the recipient is missing or invalid.
{
  "code": "invalid_input",
  "message": "Either the input stream or parameter is invalid or absent"
}
/api/v1/messages 400 Arattai-BusinessNumberId is absent.
{
  "code": "missing_header",
  "message": "A required header is missing from the request"
}
/api/v1/messages 400 The rate limit has been exceeded. Returned as 400, not 429 - match on the code, not the status.
{
  "code": "too_many_requests",
  "message": "You have reached the maximum number of requests"
}
/api/v1/messages 401 The OAuth token is missing, invalid, or expired.
{
  "code": "invalid_oauthtoken",
  "message": "You are not authenticated to do this operation"
}
/api/v1/messages 401 The request was not authenticated.
{
  "code": "unauthenticated",
  "message": "The request was not authenticated"
}
/api/v1/messages 403 The token lacks the required scope, or the request crosses a company/tenant boundary.
{
  "code": "unauthorised",
  "message": "The user does not have enough permission to access the resource"
}
/api/v1/messages 405 The HTTP method used is not supported for this endpoint.
{
  "code": "invalid_method",
  "message": "Invalid method"
}
/api/v1/messages 400 The recipient is not an Arattai user, or the user_id doesn't resolve.
{
  "code": "invalid_recipient",
  "message": "The recipient is not an Arattai user"
}
/api/v1/messages 400 A media/link URL in the payload isn't reachable.
{
  "code": "url_not_accessible",
  "message": "The media URL provided is not accessible"
}
/api/v1/messages 400 The media type isn't supported by Arattai.
{
  "code": "invalid_file_type",
  "message": "The media type is not supported by Arattai"
}
/api/v1/messages 400 A send carrying user_id found no ongoing conversation with that recipient. Supplying user_id requires one to already exist.
{
  "code": "no_ongoing_conversation",
  "message": "No ongoing conversation exists with this user. Conversational messages can only be sent within an active conversation window"
}
/api/v1/messages 400 This business number is not permitted to message the recipient.
{
  "code": "business_recipient_not_allowed",
  "message": "This business number is not allowed to message the recipient"
}
/api/v1/messages 409 The supplied user_id no longer matches the recipient phone number's current Arattai user.
{
  "code": "recipient_identity_mismatch",
  "message": "The provided user_id does not match the current Arattai user for this phone number. The number may now belong to a different user"
}
/api/v1/messages 400 The media type was rejected by Arattai.
{
  "code": "unsupported_file",
  "message": "File is not supported"
}
/api/v1/messages 400 The referenced media is zero bytes.
{
  "code": "empty_file_not_allowed",
  "message": "The uploaded file is empty"
}
/api/v1/messages 413 The referenced media exceeds Arattai's size limit.
{
  "code": "file_size_too_large",
  "message": "Size of the file is too large"
}
/api/v1/messages 500 An unexpected server error occurred.
{
  "code": "operation_failed",
  "message": "An unexpected error occurred while processing the request"
}