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"
}
}
| Field | Always | Meaning |
|---|---|---|
type | Yes | The broad category; see Error types |
code | Yes | The specific error; see Error codes |
message | Yes | What went wrong, in English |
param | No | The parameter or body field at fault, such as domain, type or domains |
doc_url | Yes | The section of this page for the code |
request_id | Yes | The same value as the Request-Id header. Quote it when you contact us |
Error types
type | Statuses | Meaning |
|---|---|---|
invalid_request_error | 400, 404, 422 and other 4xx | The request cannot be served as sent. Fix it before retrying |
authentication_error | 401 | No API token, or one that is not valid |
permission_error | 403 | The account's plan does not include the API; see plan_required |
rate_limit_error | 429 | A quota window is spent |
api_error | 500, 502, 504 | Something failed on our side or upstream. Retrying later may succeed |
Error codes
| Status | code | Retry? |
|---|---|---|
400 | invalid_request | No, fix the request |
400 | invalid_domain | No, fix the domain |
401 | unauthenticated | No, send a token |
401 | invalid_token | No, use a valid token |
403 | plan_required | No, upgrade the plan |
404 | not_found | No, fix the URL |
422 | not_registrable | No |
422 | unsupported_tld | No |
429 | quota_exceeded | After Retry-After seconds |
500 | internal_error | Yes, later |
502 | upstream_error | Yes, later |
504 | upstream_timeout | Yes, 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.