Verify and connect a domain
verify_domain
Finishes a domain ownership check and adds the domain to the site once its TXT record matches.
It checks one thing: the TXT record at _modulify-verification.<domain> against the token start_domain_verification returned. Add that record, not the records get_domain_status lists, since the pending domain is not in get_domain_status until this call adds it.
When the TXT record matches, the domain joins the site's custom domains, with its www companion when it is a root domain and that hostname is free. It is added even while its A, AAAA and CNAME records are still missing, so it comes back with IsConnected false until those are in place. The answer carries the new domainId, so call get_domain_status with it afterwards to track that.
It is refused when no verification is pending, when the domain is already on this site or another one, and when the site already has 10 custom domains. When the domain is already on this site, the refusal also clears the pending verification. It needs a paid plan and the Manage domains permission.
DNS can take a while to propagate, so a failure here often just means not yet. Wait a few minutes and try again rather than changing anything. See A domain waiting on verification.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site id. The domain being verified is the one start_domain_verification recorded. |