HTTP Status Codes
Every request includes an HTTP status code with the result. The status code should examined before the response. In most error cases, the response body will contain an errors XML document with more details.
Successful status codes (2xx)
200 OK- The request was successful.
201 Created- The resource was successfully created. Confirms a success when creating a new account, credit, subscription, etc.
204 No Content- The request was successful and there is no response body.
Client error status codes (4xx)
400 Bad Request- The request was invalid or could not be understood by the server. Resubmitting the request will likely result in the same error.
401 Unauthorized- Your API key is missing or invalid.
402 Payment Required- Your Recurly account is in production mode but is not in good standing. Please pay any outstanding invoices.
403 Forbidden- The login is attempting to perform an action it does not have privileges to access. Verify your login credentials are for the appropriate account.
404 Not Found- The resource was not found with the given identifier. The response body will explain which resource was not found.
405 Method Not Allowed- The requested method is not valid at the given URL.
406 Not Acceptable- The request's
Acceptheader is not set toapplication/xml. 412 Precondition Failed- The request was unsuccessful because a condition was not met. For example, this message may be returned if you attempt to cancel a subscription for an account that has no subscription.
422 Unprocessable Entity- Could not process a
POSTorPUTrequest because the request is invalid. See the response body for more details. 429 Too many Requests- You have made too many API requests in the last hour. Future API requests will be ignored until the beginning of the next hour.
Server error status codes (5xx)
500 Internal Server Error- The server encountered an error while processing your request and failed.
502 Gateway Error- The load balancer or web server has trouble connecting to the Recurly app. Please try the request again.
503 Service Unavailable- The service is temporarily unavailable. Please try the request again.
Future compatibility
For future compatibility, please interpret the following status code ranges:
- 200–299 as success,
- 400–499 as client request errors,
- 500–599 as server errors
404 Not found responses
When a lookup, update, or delete request is requested on an object that does
not exist, the server returns 404 Not Found:
Status: 404 Not Found Content-Type: application/xml; charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<error>
<symbol>not_found</symbol>
<description>The record could not be located.</description>
</error>
