2xx range indicate success, codes in the 4xx range indicate an error that resulted from the information provided in the request (e.g. a required parameter was missing), and codes in the 5xx range indicate an error with Permutive’s API.
HTTP status codes
You may encounter the following response codes. Any unsuccessful response will contain more information to help you identify the cause of the problem.| Response code | Description |
|---|---|
200 OK | Everything worked as expected and the request succeeded. |
400 Bad Request | The request could not be understood by the server, usually due to malformed syntax such as a missing required parameter. |
401 Unauthorized | The client has not provided a valid Authentication HTTP header. |
403 Forbidden | The client has provided a valid Authentication header, but it does not have permission to access this resource. |
404 Not Found | The requested resource cannot be found or does not exist. |
500, 502, 503, 504 Internal Server Error | The server encountered an error while processing your request and failed. Something went wrong on Permutive’s end. |
Subcodes
If there has been an error (non-200 response), the body of the response will be a JSON object that describes the error in more detail. To help you better understand what went wrong and reference the problem, the API defines an error subcode and human-readable messages for every type of error that can occur. Thedocs field provides a resource where you can find out more information about this error. If you wish to contact our support team about any API errors, you can reference the request_id of your request.
All error responses from the API follow a common format. Here’s an example response to a request with an invalid API key:
cause which is optional.