setSeo
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
| Param | Type | Notes | Description |
|---|---|---|---|
credentials | FlowstackCredentials | required | The app owner's credentials (owner-scoped JWT). |
siteId | string | required | The site/app id to update. |
seo | AppSeo | required | The fields to merge. Every field is optional; omitted fields are left untouched. |
config | FlowstackClientConfig | — | Client config (baseUrl, tenantId as needed). |
Returns
| Field | Type | Description |
|---|---|---|
| — | 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
Source: src/api/client.ts (Builder SEO, P0-176) · Also available in llms-full.txt and registry.json.