Get started
Errors
A failed call answers with an HTTP status of 400 or higher and a JSON body. Check the status first, then the stable code.
Two error shapes
Most errors (sign-in, payment, rate limit, server errors) use this shape. error is a stable code you can check in your code, message is text for people:
{
"message": "Your card was declined.",
"isAuthError": false,
"error": "card_declined",
"requestId": "8f2c1e9a-4b7d-4e2a-9c3f-1a2b3c4d5e6f"
}Some input checks keep the shape of our first API: error and message both hold the text, and the stable code, when there is one, is in code:
{
"error": "Invalid input: domains array contains duplicates",
"message": "Invalid input: domains array contains duplicates",
"isAuthError": false,
"code": "invalid_request",
"requestId": "8f2c1e9a-4b7d-4e2a-9c3f-1a2b3c4d5e6f"
}In this shape message is usually the same text as error, but not always (for example on "Some domains are not available"). Some of these answers carry extra fields, like unavailableDomains, or success and link on NO_.
A few older errors use the first shape but put text in error and have no stable code, for example 404 {"error": "Order not found", "message": "Order not found", .. For those, check the HTTP status.
A request with a NUL character (\u0000) in the path, query or body is refused with 400 {"error": "invalid_, with no requestId in the body (it is still in the x-request-id header).
isAuthErroristruewhen the token is the problem.details(only on some errors) holds extra facts, for example the limit onrate_.limited - Each endpoint page lists the errors that route can give, with an example of each.
Don't match on message texts: they can change. Use the HTTP status and the code (error in the first shape, code in the second).
requestId
Every error body has a requestId, and every answer, also a good one, sends the same value in the x-request-id header. Save it in your logs. When you ask support about a call, send the requestId and we can find it.
HTTP statuses
| Status | Meaning | Codes you can get (examples) |
|---|---|---|
| 400 | The request is not valid. Fix it before you send it again. | invalid_, organization_, invalid_, NO_, coupon_, invalid_, domains_, too_, tag_ |
| 401 | The token is missing or wrong, or can't use this workspace. | missing_, invalid_, token_, token_, wrong_, organization_ |
| 402 | The payment did not go through. Nothing was charged. | card_, card_, payment_ |
| 403 | The token or its owner may not do this. | missing_, not_, no_, account_, test_, not_ |
| 404 | Not found. | route_, order_, domain_ |
| 409 | Not possible right now: something else is still running for this order or key, or the subscription is not ready for it (order form not sent, being cancelled). Wait or fix that, then send it again. | idempotency_, busy, order_, cancelling |
| 429 | Too many calls, or the server is busy. Wait for Retry-After (when it is sent). | rate_, too_, busy |
| 500 | Something went wrong on our side. | server_, needs_, order_, payment_ |
| 501 | Buying with a saved card is not available right now. | not_ |
| 503 | The server is busy, or payments are off for a moment. Try again in a few seconds (see Retry-After, when it is sent). | busy, payments_ |
After a purchase error
402: nothing was charged. Fix the card in the portal, then try again with a newIdempotency-Key.500needs_: you may have been charged. Our team has been told and will finish or refund the order. Do not retry with a newteam Idempotency-Key.500order_: you paid and the order exists (form_ failed details.), but its domains and mailboxes could not be saved. Our team has been told. You can also finish the order form in the portal.order_ id 500server_or no answer at all: send the same call again with the sameerror Idempotency-Key. You get the first result, and you are never charged twice.
