List of general and specific errors you may encounter when using the REST API.
These error codes are consistent for all endpoints.
You're not authorized to use the endpoint. This usually happens due to missing a user token.
{ "error": { "code": "forbidden", "message": "Not authorized" }}You exceeded the maximum allotted requests.
The limit of requests is per endpoint basis so you can continue using other endpoints even if some of them give you this error.
{ "error": { "code": "rate_limited", "message": "The rate limit of 6 exceeded for 'api-www-user-update-username'. Try again in 7 days", "limit": { "remaining": 0, "reset": 1571432075, "resetMs": 1571432075563, "total": 6 } }}There was an error with the request, the error.message would contain information about the issue.
{ "error": { "code": "bad_request", "message": "An english description of the error that just occurred" }}This error is similar to the HTTP 500 Internal Server Error error code.
{ "error": { "code": "internal_server_error", "message": "An unexpected internal error occurred" }}The requested resource could not be found.
{ "error": { "code": "not_found", "message": "Could not find the RESOURCE: ID" }}The endpoint you're requesting does not handle the method you defined. The error message will contain the methods the endpoint responds to.
{ "error": { "code": "method_unknown", "message": "This endpoint only responds to METHOD" }}These error codes can happen when using any deployment related endpoint.
Some of the files you defined when creating the deployment are missing.
{ "error": { "code": "missing_files", "message": "Missing files", "missing": [] }}You tried to create an empty deployment.
{ "error": { "code": "no_files", "message": "No files in the deployment" }}The limit of environment variables per deployment is 100 and you defined more. The error message indicates the amount you defined.
{ "error": { "code": "env_too_many_keys", "message": "Too many env vars have been supplied (100 max allowed, but got #)" }}Some environment variable name contains an invalid character. The only valid characters are letters, digits and _.
The error message will contain the KEY with the problem.
{ "error": { "code": "env_key_invalid_characters", "message": "The env key \"KEY\" contains invalid characters. Only letters, digits and `_` are allowed", "key": "KEY" }}An environment variable name is too long, the maximum permitted name is 256 characters.
The error message contains the environment KEY.
{ "error": { "code": "env_key_invalid_length", "message": "The env key \"KEY\" exceeds the 256 length limit", "key": "KEY" }}An environment variable value contains a value too long, the maximum permitted value is 65536 characters.
The error message contains the environment KEY.
{ "error": { "code": "env_value_invalid_length", "message": "The env value for \"KEY\" exceeds the 65536 length limit", "key": "KEY", "value": "VALUE" }}The value of an environment variable is an object but it doesn't have a uid.
The error message contains the environment KEY which has the error.
{ "error": { "code": "env_value_invalid_type_missing_uid", "message": "The env key \"KEY\" passed an object as a value with no `uid` key" }}The value of an environment variable is an object with unknown attributes, it can only have a uid key inside the object.
{ "error": { "code": "env_value_invalid_type_unknown_props", "message": "The env key \"KEY\" passed an object with unknown properties. Only `uid` is allowed when passing an object" }}An environment variable value passed is of an unsupported type.
The error message contains the environment KEY.
{ "error": { "code": "env_value_invalid_type", "message": "The env key \"KEY\" passed an unsupported type for its value", "key": "KEY" }}You're trying to use a secret but you don't have access to it.
{ "error": { "code": "env_secret_forbidden", "message": "Not allowed to access secret \"NAME\"", "uid": "UID" }}You're trying to use a secret as an environment value and it doesn't exist.
{ "error": { "code": "env_secret_missing", "message": "Could not find a secret by uid \"UID\"", "uid": "UID" }}These error codes can happen when using any domain related endpoint.
You don't have access to the domain, this usually means the domain is owned by another account or team.
The domain is specified in the message and the DOMAIN key.
{ "error": { "code": "forbidden", "message": "You don't have access to \"DOMAIN\"", "domain": "DOMAIN" }}The domain name could not be found in the system.
{ "error": { "code": "not_found", "message": "Domain name not found" }}The domain name wasn't specified in the URL. This means you tried to use an endpoint which requires you to define the domain name in the URL but didn't define it.
{ "error": { "code": "missing_name", "message": "The URL was expected to include the domain name. Example: /domains/google.com" }}You must remove the aliases described in the error before removing the domain.
The aliases are specified in the ALIASES key.
{ "error": { "code": "conflict_aliases", "message": "The following aliases must be removed before removing the domain: ALIASES", "aliases": ["ALIASES"] }}When trying to modify a domain nothing was required to change.
{ "error": { "code": "not_modified", "message": "Nothing to do" }}When trying to add a domain the name wasn't present in the request body.
{ "error": { "code": "missing_name", "message": "The `name` field in the body was expected but is not present in the body payload. Example value: `example.com`" }}The domain name defined in the request body is invalid.
The name is specified in the error as the NAME key.
{ "error": { "code": "invalid_name", "message": "The `name` field contains an invalid domain name (\"NAME\")", "name": "NAME" }}To add a custom domain to your account or team you need to upgrade to a paid plan.
{ "error": { "code": "custom_domain_needs_upgrade", "message": "Domain name creation requires a premium account." }}The domain name you're trying to add already exists.
The domain name and its current ID are received in the NAME and DOMAIN_ID keys.
{ "error": { "code": "not_modified", "message": "The domain \"NAME\" already exists", "name": "NAME", "uid": "DOMAIN_ID" }}The domain name can't be created. Most likely it couldn't be verified.
{ "error": { "code": "forbidden", "message": "You don't have permission to create a domain" }}The domain was purchased but there was an error adding it to your account. Please contact support.
{ "error": { "code": "failed_to_add_domain", "message": "The domain was bought but couldn't be added." }}The price of a domain could not be determined.
{ "error": { "code": "service_unavailable", "message": "Failed to determine the domain price" }}The expectedPrice supplied in the request body does not match the actual domain price, which is specified in the actualPrice key.
{ "error": { "code": "price_mismatch", "message": "The expected price does not match the actual price", "price": "ACTUAL_PRICE" }}The domain name is not available to be purchased.
{ "error": { "code": "not_available", "message": "Domain is not available" }}The domain name or TLD is invalid or not supported.
{ "error": { "code": "invalid_domain", "message": "Invalid domain or TLD" }}The DNS record key name is required and was not provided. It could be any valid DNS record.
{ "error": { "code": "missing_type", "message": "Missing `type` parameter" }}These error codes can happen when using any DNS related endpoint.
The DNS record key name is required and was not provided. It should be either a subdomain or @ for the domain itself.
{ "error": { "code": "missing_name", "message": "Missing `name` parameter" }}The DNS record key type is required and was not provided. It could be any valid DNS record.
{ "error": { "code": "missing_type", "message": "Missing `type` parameter" }}These errors can occur when using any OAuth2 related endpoint.
The OAuth2 client ID could not be found or doesn't exist.
{ "error": { "code": "not_found", "message": "OAuth client not found: CLIENT_ID" }}