REST API
GET /external/workspace
Workspace metadata, customConfig, and schemaOrg.
Returns metadata + free-form config the consumer site uses to configure itself (theme, feature flags, schema.org payload).
GET /external/workspace
X-Api-Key: bk_live_xxxResponse
{
"id": "ws_2N4rDQk",
"slug": "olavisa-pt",
"name": "Olavisa",
"locales": ["en", "pt"],
"defaultLocale": "pt",
"customConfig": {
"theme": "purple",
"featureFlags": { "newApply": true }
},
"schemaOrg": {
"Organization": {
"@type": "Organization",
"name": "Olavisa",
"legalName": "Olavisa, Lda."
}
}
}| Field | Type | Notes |
|---|---|---|
id | string | Internal workspace ID. |
slug | string | URL-safe workspace identifier. |
name | string | Human-readable name. |
locales | string[] | BCP47 codes the workspace serves. First entry is canonical. |
defaultLocale | string | The locale served at the bare URL. |
customConfig | object | null | Free-form JSON. Consumer interprets. |
schemaOrg | object | null | Keyed by @type. Merged into per-page JSON-LD. |
SDK
const ws = await bf.workspace.get()You can narrow the two free-form payloads' types if you have a known shape:
type MyConfig = { theme: string; featureFlags: Record<string, boolean> }
type MySchema = { Organization: { '@type': 'Organization'; name: string } }
const ws = await bf.workspace.get<MyConfig, MySchema>()