---
title: "Replace the white-label configuration"
method: PUT
path: "/api/v1/tenant-config"
tags: ["tenant"]
---

# Replace the white-label configuration

`PUT /api/v1/tenant-config`

## Request

- Base URL: `https://worthune.com`
- URL: `https://worthune.com/api/v1/tenant-config`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`

Full validation at write time: theme overrides pass the WCAG AA gate, disclosures are append-only paragraphs, the allowlist takes bare https origins, hideAttribution is Growth-gated. Requires the current White-Label Addendum on file.

## Request body

- TenantConfigInput: Full replace: every omitted field takes its default (null / light / [] / false / true). A bound assumptionProfile must exist in the org's store or be the built-in illustration.
  - `brandName` string, nullable
  - `themeMode` 'light' | 'dark': Default "light".
  - `themeOverrides` ThemeOverrides: Merged onto the default theme for themeMode and validated through the WCAG AA contrast gate; a failing token is rejected with its ratio, never shipped.
    - `colors` object: Partial ThemeColors; text/textMuted must reach 4.5:1 on background and surface, primaryText 4.5:1 on primary.
      - `background` string
      - `surface` string
      - `text` string
      - `textMuted` string
      - `primary` string
      - `primaryText` string
      - `positive` string
      - `negative` string
      - `border` string
      - `chart` string[]: Chart series palette, in draw order; each must reach 3:1 on background.
    - `typography` object
      - `fontFamily` string
      - `fontFamilyMono` string
      - `baseSizePx` number
      - `scaleRatio` number
    - `spacingPx` number[]: Spacing scale in px, smallest first.
    - `radiusPx` number
  - `disclosureAdditions` string[], nullable
  - `domainAllowlist` string[], nullable
  - `hideAttribution` boolean: true requires the Growth plan (422 otherwise).
  - `assumptionProfile` ProfileRef: An assumption profile from GET /api/v1/assumption-profiles, or the built-in illustrative-6-3-3@1.0.0.
    - `id` string, required
    - `version` string, required: Exact version; a pinned run never silently gets a newer one.
  - `evidenceAffordances` boolean

## Response `200`

Stored.

- object
  - `ok` unknown, required
  - `config` TenantConfig, required
    - `brandName` string, nullable, required
    - `themeMode` 'light' | 'dark', required
    - `themeOverrides` ThemeOverrides, required: Merged onto the default theme for themeMode and validated through the WCAG AA contrast gate; a failing token is rejected with its ratio, never shipped.
      - `colors` object: Partial ThemeColors; text/textMuted must reach 4.5:1 on background and surface, primaryText 4.5:1 on primary.
        - `background` string
        - `surface` string
        - `text` string
        - `textMuted` string
        - `primary` string
        - `primaryText` string
        - `positive` string
        - `negative` string
        - `border` string
        - `chart` string[]: Chart series palette, in draw order; each must reach 3:1 on background.
      - `typography` object
        - `fontFamily` string
        - `fontFamilyMono` string
        - `baseSizePx` number
        - `scaleRatio` number
      - `spacingPx` number[]: Spacing scale in px, smallest first.
      - `radiusPx` number
    - `disclosureAdditions` string[], required: Firm paragraphs appended AFTER the engine's core disclosure — the core text is not replaceable.
    - `domainAllowlist` string[], required
    - `hideAttribution` boolean, required: Growth plan only — rejected at write time on other plans.
    - `assumptionProfile` ProfileRef, required: An assumption profile from GET /api/v1/assumption-profiles, or the built-in illustrative-6-3-3@1.0.0.
      - `id` string, required
      - `version` string, required: Exact version; a pinned run never silently gets a newer one.
    - `evidenceAffordances` boolean, required: Provenance chips and the checkable footer on tenant embeds; defaults on.

## Other responses

- `400`: Malformed JSON, a body of the wrong shape, or a top-level field that fails its check.
- `401`: No key presented (Authorization: Bearer wk_… or X-Api-Key).
- `402`: Unrecognized or revoked API key.
- `403`: The key's role is below the operation's floor (viewer < developer < owner), the key predates organization support, or the plan lacks the feature. On a sandbox key, also: the cap of 5 active households on create and import, the cap of 1 active Lodestar mandate, and the white-label surfaces (tenant config, embed tokens) and narration or mapping drafts on Worthune's model (they run on your own: a model assigned at /api/v1/model-policy, or x-model-key), which the sandbox does not carry.
- `422`: Validation failed (per-field paths), or the bound assumptionProfile does not exist in this org.
- `428`: The White-Label Addendum is not accepted at its current version — POST /api/v1/legal/accept first.
- `429`: Hourly per-org stateful quota, a per-route durable limit, or the 120 requests/minute per-IP burst backstop.
- `503`: Billing is not configured on this deployment; household resources are disabled rather than served without tenancy (production fail-closed).

---

[API](https://skmtc.dev/worthune/apis/worthune-api.md) · [All operations](https://skmtc.dev/worthune/apis/worthune-api/llms.txt) · [OpenAPI document](https://skmtc.dev/worthune/apis/worthune-api/revisions/9f2241072555?raw)
