disconnectDomain
Client function: disconnect a custom domain from a site.
import { disconnectDomain } from 'flowstack-sdk'Non-React client function. Removes the domain mapping. DELETE /api/v1/apps/{siteId}/domains/{domain}.
Signature
disconnectDomain(credentials, siteId, domain, config?): Promise<ApiResponse<{ success: boolean; domain: string; site_id: string; message: string }>>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. |
domain | string | required | The custom domain, e.g. app.example.com. |
config | FlowstackClientConfig | since 0.2.8 | Client config (baseUrl, appScope, tenantId as needed). |
Returns
| Field | Type | Description |
|---|---|---|
| — | Promise<ApiResponse<{ success: boolean; domain: string; site_id: string; message: string }>> | Confirmation of removal. |
Examples
Disconnect
await disconnectDomain(credentials, siteId, 'app.example.com', { appScope });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
Source: src/api/client.ts (Custom Domains, P0-158) · Also available in llms-full.txt and registry.json.