Skip to navigation

Add a Domain

Beta

Adds a custom domain to a project. Adding a domain triggers DNS verification and binds the domain in the routing layer. The domain starts in the pending verification status until DNS propagation and hostname validation completes.

The response’s data.pointing_records object contains the DNS records that point the domain at the project: use the CNAME record value for a subdomain, or the A record value for an apex domain. This is the only endpoint that returns the pointing records, so store them before moving on. The Get a Domain and List Domains endpoints don’t return them.

If the domain is already bound to a different store, this endpoint returns a 409 Conflict whose meta.ownership_verification contains the TXT record you must publish before claiming the domain with the Claim a Domain endpoint.

Authentication

X-Auth-Tokenstring

OAuth scopes

UI NamePermissionParameter
Infrastructure Deploymentsread-onlystore_infrastructure_deployments_read_only
Infrastructure Deploymentscreate previewstore_infrastructure_deployments_create_preview
Infrastructure Deploymentsmanagestore_infrastructure_deployments_manage
Infrastructure Projectsread-onlystore_infrastructure_projects_read_only
Infrastructure Projectsmanagestore_infrastructure_projects_manage
Infrastructure Logsread-onlystore_infrastructure_logs_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

Path parameters

project_uuidstringRequiredformat: "uuid"
The UUID of the project to add the domain to.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Request

This endpoint expects an object.
domainstringRequired
The custom domain name to add to the project.

Response

The domain was added successfully.
dataobjectOptional
A custom domain bound to an infrastructure hosting project.
metaobjectOptional
Empty meta object.

Errors

404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error