Status codes
HTTP status codes returned by the Servers.com Public API.
You will get a status code with your request to understand if it was successful. A 2xx code indicates a successful request. A 4xx code usually appears when there is an error because of provided data (missed or incorrect parameter). If something goes wrong on our server's end, a 5xx code is shown. Here is a list of common status codes you'll encounter when using our API.
| Code | Comment |
|---|---|
| 200 | OK: A request has been successfully completed. |
| 201 | Created: A new resource has been created. |
| 202 | Accepted: A request has been accepted but has yet to be processed. It's used for asynchronous operations. |
| 204 | No Content: A typical response to a DELETE request containing only headers. |
| 400 | Bad request: A request is unclear, mostly because of incorrect syntax. You need to check if you provided the correct data. |
| 402 | Payment required: This code is reserved for transaction processing; a payment must be made to complete the request. It's recommended to make sure you have completed all the necessary payment operations from your side. |
| 404 | Not found: A requested resource cannot be found. Some parameters or resources do not exist or have not been created yet. Check the actual state of all the resources and the accuracy of a request. |
| 409 | Conflict: A request has a conflict with an actual state of a target resource. |
| 412 | Precondition failed: Parameters in request headers cannot be processed because of a blocker. In most cases, you will get such a code when a host is not completely provisioned. |
| 422 | Unprocessable entity: A type of content and syntax is correct, but instructions couldn't be processed. In practice, some of the required parameters in a request body are missed or have an invalid value. The errors message contains an issue's description. |
| 503 | Service unavailable: The service is unavailable at the moment. Usually, it means that a cloud region is being maintained. You can check it on our status page. |