Domains API: Domain Association | Yext Hitchhikers Platform
Domain associations are a top-level resource within the Domains API. Creating a Domain Association will begin serving the contents of the associated resource at the Domain Association’s hostname
(given DNS for the hostname is already set up).
Field | Description | Example |
---|---|---|
Name name |
The unique identifier for the domain association. The domain will use a resource identifier that not only identifies it but also indicates what business and domain it belongs to. It will follow the format: /accounts/{business_id}/domains/{domain_id}/associations/{association_id}. The association ID will be in UUIDv7 format. | /accounts/123456/domains/abcdf-12343-defsg-12345/associations/abcdf-12343-defsg-12345 |
Hostname hostname |
This is the hostname that will serve the content that the association provides. If the parent domain is a wildcard, this can be any subdomain of the wildcard. If the parent domain is not a wildcard, this must match the parent domain’s hostname. | hitchhikers.yext.com |
Association | This is the field that ties the domain to the resource within the Yext system, such as Pages. This will be an object. See the association types table below. | |
Create time create_time |
This is the UTC time when the domain association was created | |
Update time update_time |
This is the UTC time when the domain association was last updated | |
Errors errors |
An optional object returned if there are any asynchronous issues with the domain association setup. The GET and LIST endpoints return this if the view mode is set to full. |
Association Types
For now, the only association type available is Pages, so all domains must use the Pages destination, and all associations must have a site resource defined. The site resource cannot reference a classic site.
Field | Description | Example |
---|---|---|
Name name |
The resource name for the site that the domain should be connected to. This will follow the format /accounts/{business_id}/sites/{site_id} , where the site_id is the numeric identifier found in the URL for the Pages site. |
/accounts/123/sites/456 |
Primary primary |
A boolean to indicate whether or not the domain should be the canonical domain for the site. Sites support aliases which allow content to be served on different domains. Only one association for a site can have primary = true . |
<% elem.innerText %>