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.
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.