Skip to main content

Errors

Every 4xx and 5xx response of /v1 has the same JSON body. Branch on error.code, which is stable; error.message is for people and may change.

The error body​

{
"error": {
"type": "invalid_request_error",
"code": "invalid_domain",
"message": "A full domain name with a known TLD is required.",
"param": "domain",
"doc_url": "https://docs.namebeta.com/api/errors#invalid_domain",
"request_id": "req_8f14e45fceea167a5a36dedd4bea2543"
}
}
FieldAlwaysMeaning
typeYesThe broad category; see Error types
codeYesThe specific error; see Error codes
messageYesWhat went wrong, in English
paramNoThe parameter or body field at fault, such as domain, type or domains
doc_urlYesThe section of this page for the code
request_idYesThe same value as the Request-Id header. Quote it when you contact us

Error types​

typeStatusesMeaning
invalid_request_error400, 404, 422 and other 4xxThe request cannot be served as sent. Fix it before retrying
authentication_error401No API token, or one that is not valid
permission_error403The account's plan does not include the API; see plan_required
rate_limit_error429A quota window is spent
api_error500, 502, 504Something failed on our side or upstream. Retrying later may succeed

Error codes​

StatuscodeRetry?
400invalid_requestNo, fix the request
400invalid_domainNo, fix the domain
401unauthenticatedNo, send a token
401invalid_tokenNo, use a valid token
403plan_requiredNo, upgrade the plan
404not_foundNo, fix the URL
422not_registrableNo
422unsupported_tldNo
429quota_exceededAfter Retry-After seconds
500internal_errorYes, later
502upstream_errorYes, later
504upstream_timeoutYes, later

New codes may be added. Treat an unknown code by its type and status.

invalid_request​

400. A parameter or the body does not match what the endpoint accepts: a DNS type outside the eight supported ones, a currency we do not convert to, a batch that is not a list of 1 to 50 strings. param names the field, and message says what is wrong with it. The same code comes with other 4xx statuses when the request itself is malformed, such as 405 for a method the path does not support or a body that is not valid JSON.

invalid_domain​

400. The input is not a domain name we can look up: a bare label such as kettlory, a TLD we do not know, or characters that cannot appear in a domain name. The availability endpoints also reject subdomains such as www.kettlory.com; the DNS endpoint accepts them. param is domain.

In a batch, an invalid input does not fail the request: its entry in results carries error.code invalid_domain instead of a status, and is not counted.

unauthenticated​

401. The request has no Authorization: Bearer <token> header. A token in the query string is not read. See Authentication.

invalid_token​

401. The token is malformed, unknown, expired or revoked. Check that you copied all 57 characters, and that the token has not expired and is still listed in your account panel. See When authentication fails.

plan_required​

403. The token is valid, but the account is on the Free plan. The REST API and the MCP server are part of the Pro, Business and Enterprise plans, and both refuse every request from a Free account with 403 and plan_required: /v1 in the error body above, the MCP server in a JSON-RPC error. Signing in again or creating a new token does not help; upgrade on namebeta.com/pricing. See Plan required in the MCP docs for the MCP response.

not_found​

404. No endpoint has this path, as in Unrecognized request URL (GET: /v1/domain/kettlory.com). Check the path against the Reference; every path starts with /v1.

not_registrable​

422. The name is a TLD, a second-level registry suffix or another public suffix, which cannot be registered as a domain. In a batch the entry carries this code instead of a status, and is counted.

unsupported_tld​

422. TLD prices know nothing about this TLD. param is tld.

quota_exceeded​

429. The hourly or daily quota of your plan is spent for this bucket, and nothing was counted. Wait the number of seconds in the Retry-After header. See Over the limit.

internal_error​

500. Something failed on our side. We are notified automatically; retry later, and quote the request_id if it keeps happening.

upstream_error​

502. A registry or name server answered the lookup with an error. The message includes what it said. Retrying later may succeed.

upstream_timeout​

504. A registry or name server did not answer in time. Retrying later may succeed.