Docs / built-apps / disconnectDomain

disconnectDomain

utilitysince 0.2.8not for built apps

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

ParamTypeNotesDescription
credentialsFlowstackCredentialsrequiredThe app owner's credentials (owner-scoped JWT).
siteIdstringrequiredThe site/app id to operate on.
domainstringrequiredThe custom domain, e.g. app.example.com.
configFlowstackClientConfigsince 0.2.8Client config (baseUrl, appScope, tenantId as needed).

Returns

FieldTypeDescription
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

connectDomain · listDomains

Source: src/api/client.ts (Custom Domains, P0-158) · Also available in llms-full.txt and registry.json.