Skip to content
Support

Partially update tenant settings

client.tenants.settings.update(stringtenantID, SettingUpdateParams { target_language } body, RequestOptionsoptions?): SettingUpdateResponse { settings, tenant_id }
PATCH/v1/tenants/{tenant_id}/settings

Partially updates the enrichment settings for the specified tenant_id using RFC 7396 JSON Merge Patch semantics (media type application/merge-patch+json; application/json is also accepted). For each member: a value sets that setting, JSON null removes it (e.g. {"target_language": null} clears the target language), and an omitted member is left unchanged. The tenant_id is taken from the path, so a request can only ever modify its own tenant's settings. target_language is normalized to a canonical BCP-47 locale (e.g. "en-us" becomes "en-US"); an empty string is rejected (send null to remove it). While a tenant data purge runs for the same tenant_id, this write is rejected with HTTP 409 (code tenant_write_conflict) and may be retried.

ParametersExpand Collapse
tenantID: string
minLength1
maxLength255
body: SettingUpdateParams { target_language }
target_language?: string | null

Target BCP-47 locale to translate into; normalized to a canonical form (e.g. "en-us" becomes "en-US"). Send null to remove it; omit to leave it unchanged. An empty string is rejected.

maxLength35
ReturnsExpand Collapse
SettingUpdateResponse { settings, tenant_id }
settings: Settings { target_language }

Tenant-scoped enrichment configuration. Fields are optional; absent fields use server defaults.

target_language?: string

Normalized BCP-47 locale (e.g. "en-US") that language enrichment translates feedback records and topic labels into. Absent or empty means not configured.

maxLength35
tenant_id: string

Tenant ID the settings belong to

minLength1
maxLength255

Partially update tenant settings

import FormbricksHub from '@formbricks/hub';

const client = new FormbricksHub({
  apiKey: process.env['HUB_API_KEY'], // This is the default and can be omitted
});

const setting = await client.tenants.settings.update('org-123');

console.log(setting.tenant_id);
{
  "tenant_id": "org-123",
  "settings": {
    "target_language": "de-DE"
  }
}
Returns Examples
{
  "tenant_id": "org-123",
  "settings": {
    "target_language": "de-DE"
  }
}