listDomains
Client function: list the custom domains connected to a site and their status.
import { listDomains } from 'flowstack-sdk'Non-React client function. GET /api/v1/apps/{siteId}/domains.
Signature
listDomains(credentials, siteId, config?): Promise<ApiResponse<{ site_id: string; domains: CustomDomainRecord[] }>>Parameters
| Param | Type | Notes | Description |
|---|---|---|---|
credentials | FlowstackCredentials | required | The app owner's credentials (owner-scoped JWT). |
siteId | string | required | The site/app id to operate on. |
config | FlowstackClientConfig | since 0.2.8 | Client config (baseUrl, appScope, tenantId as needed). |
Returns
| Field | Type | Description |
|---|---|---|
| — | Promise<ApiResponse<{ site_id: string; domains: CustomDomainRecord[] }>> | All connected domains as CustomDomainRecord[]. |
Examples
List domains
const res = await listDomains(credentials, siteId, { appScope });
if (res.ok) res.data.domains.forEach(d => console.log(d.domain, d.status));WarningOwner/management operation — call it with the app owner's credentials from a builder/dashboard/server context, not from inside the generated app's end-user runtime.
builtAppSafe is false.See also
connectDomain · getDomainStatus · CustomDomainRecord
Source: src/api/client.ts (Custom Domains, P0-158) · Also available in llms-full.txt and registry.json.