domain
SDK

Multi-domain flows

Connect several exact domains through one recoverable browser sequence.

Provision the flow on an application-authenticated server, then pass its flow ID to the browser lifecycle.

const created = await applicationClient.createConnectionFlow({
  applicationId: 'application-1',
  tenantId: 'tenant-1',
  commandId: crypto.randomUUID(),
  targets: [
    {
      domain: 'example.com',
      records: [{ host: '@', type: 'A', value: '192.0.2.10' }],
    },
    {
      domain: 'docs.example.net',
      records: [{ host: '@', type: 'CNAME', value: 'edge.example.net' }],
    },
  ],
})

await domain0.connectDomains({
  client: browserConnectionClient,
  flowId: created.flow.id,
})

connectDomains() reuses the same single-domain controller one child at a time and announces progress. Closing preserves child references; reopening the flow continues from durable server state.

Hosted platform preview

Multi-domain flow creation is currently available on the full self-hosted application client. The hosted API-key boundary exposes single connection creation first.