Skip to main content

Success codes

On a successful request, the response status will be one of the following:
CodeNameWhen returned
200OKSuccessful GET, PATCH, or DELETE request.
201CreatedSuccessful POST that creates a new resource. The response body contains the newly created entity in JSON format.
204No ContentSuccessful request with no response body (e.g., DELETE).
Example of a successful request
GET /api/users/1 HTTP/1.1
HTTP/1.1 200 OK
Request URL: http://localhost.com/api/users/1
Request Method: GET
Status Code: 200 OK
Remote Address: 127.0.0.1:80

Error codes

When an error occurs, the response status code indicates the type of error:
CodeNameDescription
400Bad RequestThe request is malformed, such as misformatted JSON in the request body.
401UnauthorizedNo or invalid authentication details are provided.
403ForbiddenAuthentication succeeded but the authenticated user does not have access to the resource.
404Not FoundA non-existent resource was requested.
500Internal Server ErrorThe server encountered an unexpected condition that prevented it from fulfilling the request.
Example of an error response
GET /api/users/999 HTTP/1.1
HTTP/1.1 404 Not Found
Request URL: http://localhost.com/api/users/999
Request Method: GET
Status Code: 404 Not Found
Remote Address: 127.0.0.1:80
See Error Messages for details on the error response body format.

Build docs developers (and LLMs) love