Read the custom domains connected to a workspace
You can now read a workspace's custom domains through the API. GET /api/v2/workspaces/{workspace_id}/domains lists them and GET /api/v2/domains/{id} fetches one, each carrying the domain's name, its status, and a connected boolean. The id you get back is the value to pass as domain_id when you create a funnel, which is how you publish on a customer's own domain instead of the default ClickFunnels subdomain.
Check connected rather than assuming a domain that exists is ready to serve traffic. status walks initialized, connecting, ownership_verified, securing and secured as DNS and the certificate come up, so a domain can be present and still be mid-setup. These endpoints are read-only: add a domain and verify ownership in the app, then read it back here.
Agent examples: an agent can pick the right domain_id before creating a funnel, and tell a customer their domain is still securing instead of publishing onto a name that will not resolve yet.
Resources: Domain