Add a custom domain to an app
Attach hostname (pasted URLs and bare domains are accepted: bakery.com becomes www.bakery.com). One address per site; the same address again is a no-op and a failed one is retried. Refusals: invalid_hostname, reserved_hostname, domain_exists (remove the current one first), hostname_taken (another site in this workspace), hostname_in_use (a site in this workspace's SEO tab), hostname_contested (another workspace has the address or removed it in the last 30 days: the problem's records name the TXT _syndai.<address> that proves it is this workspace's, to add at the DNS host (dns_provider / dns_url say where); once DNS answers it, adding again takes the address over). Refusals are 409 or 422 with that code; 503 domains_not_configured, 502 cloudflare_unavailable. Needs coding:apps:publish.
CustomerApiKeyAuthorizationBearer <API Key>Customer API key sent as a bearer token
customer_id*stringuuidpublication_id*stringuuidapplication/json- body
hostname*stringRequest fulfilled, document follows
application/json- response
delete_records?array<>dns_provider?string|nulldns_url?string|nulldomain_connect_url?string|nullhostname?string|nullrecords*array<>status*stringcurl -X POST 'https://api.syndai.ai/api/v1/external/coding/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/apps/497f6eca-6276-4993-bfeb-53cbbbba6f08/domain' \ -H 'Content-Type: application/json' \ -d '{ "hostname": "string"}'{ "delete_records": [ { "name": "string", "type": "string", "value": "string" } ], "dns_provider": "string", "dns_url": "string", "domain_connect_url": "string", "hostname": "string", "records": [ { "name": "string", "type": "string", "value": "string" } ], "status": "string"}