Docs / built-apps / renameSite

renameSite

utilitysince 0.2.7not for built apps

Client function: rename a site (display name in the manifest + dashboard metadata).

import { renameSite } from 'flowstack-sdk'

Non-React client function. Updates a built app's display name. PATCH /api/v1/sites/{siteId} with { name }.

Signature

renameSite(credentials, siteId, name, config?): Promise<ApiResponse<{ site_id: string; name: string }>>

Parameters

ParamTypeNotesDescription
credentialsFlowstackCredentialsrequiredThe app owner's credentials (owner-scoped JWT).
siteIdstringrequiredThe site/app id to operate on.
namestringrequiredThe new display name.
configFlowstackClientConfigsince 0.2.7Client config (baseUrl, appScope, tenantId as needed).

Returns

FieldTypeDescription
Promise<ApiResponse<{ site_id: string; name: string }>>{ ok, data: { site_id, name }, error }.

Examples

Rename a site
const res = await renameSite(credentials, siteId, 'My CRM', { appScope });
if (!res.ok) console.error(res.error);
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

getAppSource · useSiteVersions

Source: src/api/client.ts (Site Ops, P0-156) · Also available in llms-full.txt and registry.json.