The MODE Platform API uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success. Codes in the 4xx range indicate an error caused by missing or incorrect information provided in the request, such as missing query parameters, insufficient authorization, etc. Codes in the 5xx range indicate an error with MODE's system these are very rare and usually temporary.

A 4xx or 5xx response status is usually accompanied by the following body:

{ "reason": <ERROR_CODE> }

Some examples of <ERROR_CODE> include: UNKNOWN_EMAIL, INVALID_USER_ID, MISSING_PARAMETERS. These error codes will help determine what needs to be done to make a successful request.

HTTP Status Code Summary

  • 200 Everything worked as expected; and the result (requested object or objects) is returned in the response body.
  • 201 A request to create an object completed successfully; and the newly created object is returned in the response body.
  • 204 A request to update or delete an object completed successfully, and no data need to be returned. The response body should be empty.
  • 400 The request is invalid. Typically due to missing parameters or an invalid parameter format.
  • 401 Authorization is required. The Authorization header is missing or contains an invalid API token.
  • 403 Unable to process request. These may happen for a variety of reasons. Please refer to the reason returned in the response body for more information.
  • 404 Resource not found.
  • 405 This method is not allowed.
  • 409 The request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request.
  • 501, 503 Temporary issues with MODE server. You may resend your request some time later.