Docs / built-apps / setSeo

setSeo

utilitysince 0.5.0not for built apps

Client function: merge builder SEO metadata into a site's seo block.

import { setSeo } from 'flowstack-sdk'

Non-React client function. PUT /api/v1/sites/{siteId}/seo. Despite the PUT verb this is a merge, not a replace: fields you omit keep their stored values. The payload is wrapped as { config: seo } on the wire.

Signature

setSeo(credentials, siteId, seo, config?): Promise<ApiResponse<{ site_id: string; seo: AppSeo }>>

Parameters

ParamTypeNotesDescription
credentialsFlowstackCredentialsrequiredThe app owner's credentials (owner-scoped JWT).
siteIdstringrequiredThe site/app id to update.
seoAppSeorequiredThe fields to merge. Every field is optional; omitted fields are left untouched.
configFlowstackClientConfigClient config (baseUrl, tenantId as needed).

Returns

FieldTypeDescription
Promise<ApiResponse<{ site_id: string; seo: AppSeo }>>The merged AppSeo config as stored after the write.

Examples

Set description and keywords
const res = await setSeo(credentials, siteId, {
  description: 'Track your training load week over week.',
  keywords: ['training', 'fitness', 'analytics'],
});
if (res.ok) console.log(res.data.seo);
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.
WarningMerge semantics: passing a partial AppSeo does not clear the fields you left out. To empty a field, send it explicitly (e.g. keywords: []) rather than omitting it.

See also

getSeo · AppSeo

Source: src/api/client.ts (Builder SEO, P0-176) · Also available in llms-full.txt and registry.json.