API Response Codes and Error Messages

The following table lists the HTTP status codes returned by the API.

Code Description
200 Successful
304

Empty Response. This code is returned when the unique identifier of an Etag is passed in an optional If-None-Match header when making a GET request. This allows you to check the server for status updates about a requested resource. If the Etag value matches the cached entry, an empty response (code 304) is returned. If the Etag value does not match the cached entry, a successful response (code 200) with new data is returned.

Passing an Etag header returns a successful response (code 200) with a hashed unique identifier of the Etag in the response. The unique identifier of the Etag can be passed in a request using an If-None-Match header to get a specifically cached response if it still exists in the cache.

400 Invalid or Bad Request. This code is returned due to one of the following reasons:
  • The API key name already exists.
  • An invalid group name is provided.
  • The request format is invalid due to invalid parameters or parameter values.
401 Unauthorized. This code is returned due to one of the following reasons:
  • The API key is revoked.
  • The JWT token is corrupted.
403 Forbidden
429 Exceeded the rate limit or quota
500

Internal Server Error. To assist with troubleshooting, this code returns an optional response header. A correlation ID is included in both the response header (x-correlation-id) and in the response body. The following example shows a sample response body with the correlationId:

500 - Internal Server Error
{
  ---
  correlationId: “xxxx-xxx-xx”
}

For assistance with understanding the internal server error, contact Zscaler Support and provide the correlation ID to learn more.