API Reference

API Error Handling

All errors that our API returns will fall under the appropriate HTTP error code below. The skeleton for all error responses is shown here. The code, status, and message fields are always included. The errors and details fields will only be included when relevant. The errorId is only returned when an Internal Server Error occurs and can be used by ZTLment to debug the underlying cause.

{
  "code": <HTTP error code>,
  "status": "<HTTP error status>",
  "message": "<error message>",
  "errors": {
    "<field>": "<validation error>",
    "<field>": "<validation error>",
  },
  "errorId": "<ZTLment Error ID>"
}
HTTP Response status codesDescription
200 OKThe success status response code that indicates that the request has succeeded.
400 Bad RequestThis code indicates that the request was denied due to a client error, for example, due to a malformed request. This is often because the request body is missing a required parameter.
401 UnauthorizedThis code indicates that the client provided no or an invalid API key.
403 ForbiddenThis code indicates that the API key doesn’t have permission to perform the request.
404 Not foundThis code indicates that the requested resource doesn’t exist, which can be either due to an incorrect request parameter (like the ID of the resource) or due to an incorrect URL.
500 Internal Server ErrorThis code indicates that something went wrong on our end. If this happens, please try again. If the issue persists, don’t hesitate to contact us to fix the error.