Conventions
Successful responses
Section titled “Successful responses”Successful requests return 200 OK or 204 No Content.
Responses that include data always have a data property. Single-resource endpoints return the object directly:
Collection endpoints return an array in data, and may include a meta property with pagination information.
Empty collections vs. not found
Section titled “Empty collections vs. not found”- Collection endpoints return an empty
dataarray when no items match — not a404. - Single-resource endpoints return
404 Not Foundwhen the requested ID does not exist.
Error responses
Section titled “Error responses”Error responses return an appropriate HTTP status code (401, 404, 422, etc.) with an error property in the response body explaining the issue.
Content type
Section titled “Content type”The API accepts and returns application/json for most requests. Binary uploads use application/octet-stream or text/plain — see the file upload guide for details.