General Errors

Errors are returned as either 401 Bad Request or 500 Internal Server Error. In the case of 401, the API will return an error object.

Error Object

AttributeTypeRemarks
codestringError code.
messagestringTranslated error message.

Example

{
  "errors": [
    {
      "code": "unknown_exception",
      "message": "An unknown exception occurred."
    }
  ]
}

Validation Errors

Validation error objects are returned as 422 Unprocessable Entity.

Validation Error Object

AttributeTypeDescription
fieldstringThe name of the field that has an error.
codestringThe validation error code describing which validation failed.
messagestringTranslated error message.

Example

{
  "errors": [
    {
      "field": "username",
      "code": "already_taken",
      "message": "Username has already been taken"
    }
  ]
}