Skip to main content

API Errors

This guide is only for response errors in our API.

The Minteo API handles errors in a clear and consistent way in all the scenarios that could potentially show up. The errors have been designed to give the developer quick feedback about the errors that he could be making. The structure is simple, with a few cases that cover all the scenarios in a way that they are intuitive to read and understand.

Error structure

The errors are returned in the response body as a JSON object that looks like this:

{
"error": "UNAUTHORIZED",
"statusCode": 401,
"message": "Missing authorization header"
}
FieldTypeDescription
errorstringThe error type.
statusCodenumberThe HTTP status code of the response.
messagestringThe error message with a human-readable description of the error.

Troubleshooting

401 Unauthorized

This error is returned when the client is not authenticated due to:

  • The request is missing the Authorization header.
  • The Authorization header has an invalid value or is malformed. The value format must be Bearer <your API key>.
  • The API key is invalid or has been deleted.

403 Forbidden

This error is returned when the client is authenticated but is not authorized to perform the requested action.

404 Not Found

This error is returned when the requested resource does not exist.

422 Unprocessable

This error is returned when the request is invalid due to:

  • The request body is missing or is malformed.
  • The request query parameters are missing or invalid.

500 Internal Server Error

This error is returned when the server is unable to process the request due to an internal error.

info

The error codes are same for both sandbox and production environments.