Error Codes

Errors come back in one shape, with an HTTP status and a machine-readable code:

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "channel must be one of: email, whatsapp, drive, upload, api"
  }
}
StatusCodeMeaning
400VALIDATION_ERRORA field or query parameter is missing or has the wrong value; the message names it
400INVALID_JSONThe body isn't valid JSON
400BAD_REQUESTThe body isn't the expected kind (for example, an upload that isn't multipart/form-data)
401UNAUTHORIZEDMissing, wrong or expired API credentials
403FORBIDDENThe key lacks the permission for this action
404NOT_FOUNDNo document with this id in the key's organization
500INTERNAL_ERRORSomething failed on our side