All Collections
Monotype API
API: Understanding Error Responses
API: Understanding Error Responses
Parmvir Singh avatar
Written by Parmvir Singh
Updated over a week ago

Understanding error responses

The API returns standard HTTP error codes such as 400, 403, 404, and 500 along with information about the error. Here are some common error responses:

  • 400 Bad Request: This often means that the request body is improperly formatted or missing required fields. In the case of missing fields, the response includes the name of the field that is missing, as in the example in the right-hand column.

  • 401 Unauthorized: This often means that the request did not include a valid OAuth token or basic authentication credentials. See Authentication.

  • 403 Forbidden: This can mean that the token in the request does not contain the scopes that the endpoint requires.

  • 404 Not Found: This can mean that the media, license, or collection you are trying to access does not exist.

  • 500 Internal Server Error: This means that an error occurred on the server. This can happen because the request is not valid (e.g., if you try to delete/edit a collection that does not exist) or if the API otherwise can't do what you requested. It can also mean there is a temporary problem with the API. Check your request and try again or contact us.

  • 503 Service Unavailable: This means the API is not reachable.

  • 429 Too Many Requests: This response indicates that the quota for rate limits has been reached. To learn more, review our article on rate limits.


Standard error response

HTTP 401 Unauthorized
{
"error": {
"ERROR_CODE": "AUTHENTICATION_FAILED",
"ERROR_MESSAGE": "The provided token is invalid or missing."
}
}

HTTP Status Codes

Standard HTTP response codes, as described above:

Error Response

ERROR_CODE: The code of the error response, possible values of which can include:

  • DATA_VALIDATION_ERROR: Validation error on the request parameters

  • RESOURCE_NOT_FOUND: Requested resource not found

  • AUTHENTICATION_FAILED: Error with token-based authentication

  • INTERNAL_SERVER_ERROR: Error processing the request

  • RATE_LIMIT_EXCEEDED: Permissible rate limit exceeded

  • PERMISSION_DENIED: Authorization error with the provided token

ERROR_MESSAGE: Details explaining the error while processing the request


Developer support

If you are a developer building with Monotype APIs, the answers to most questions can be found here.

If you can't find an answer to your question in the docs, please contact us at [email protected].

Did this answer your question?