Yext Knowledge API icon

Yext Knowledge API

Interact with Yext Knowledge API

Actions176

Domains → Create Domain Association

AI-generated

Summary

Create a new domain association under a Yext parent domain by specifying the hostname, associated site, and other optional metadata, optionally forcing domain ownership transfer if required.

Inputs

  • Force Move — Boolean flag to force domain ownership transfer if the domain is in a MOVE_REQUIRED state.
  • Name (required) — Identifier for the domain association resource (e.g., accounts/{accountId}/domains/{domainId}/associations/{associationId}).
  • Hostname (required) — Hostname for the domain association. For non-wildcard domains, matches the parent domain's hostname; for wildcard domains, can be a single-level subdomain.
  • Site (required) — The Pages site to associate with the domain, expressed as a JSON object including site name and primary status.
  • Errors — JSON array of errors or warnings related to the domain setup.
  • Create Time — Creation timestamp for the domain association.
  • Update Time — Last update timestamp for the domain association.

Output shape

a single JSON object representing the created domain association resource, including properties such as hostname, site, errors, and timestamps.

The response will include the newly created domain association's details. The operation accepts an optional query parameter 'force_move' to handle ownership moves. Errors on domain setup can be included in the input but typically are returned by the API on failure.

Examples

Example 1: Create a new domain association with force move enabled

Set Force Move to true, provide a unique Name identifier, specify the Hostname, and associate a Site JSON object.

Discussion