---
title: "Update a Theme Set"
method: PATCH
path: "/theme-sets/{theme-set-id}"
tags: ["themeSets"]
---

# Update a Theme Set

`PATCH /theme-sets/{theme-set-id}`

## Request

- Base URL: `https://api.withpersona.com/api/v1`
- URL: `https://api.withpersona.com/api/v1/theme-sets/{theme-set-id}`
- Auth: HTTP bearer

Updates an existing theme set. Both attributes are optional — an omitted attribute is left unchanged. When `styles` is present it replaces the stored styling wholesale: the tree carries the complete desired styling, and any cell absent from it falls back to the Persona default cascade.

## Path parameters

- `theme-set-id` string, required

## Query parameters

- `fields` object

## Headers

- `Key-Inflection` 'camel' | 'kebab' | 'snake'
- `Idempotency-Key` string
- `Persona-Version` '2026-09-29' | '2025-12-08' | '2025-10-27' | '2023-01-05' | '2022-09-01' | '2021-08-18' | '2021-07-05' | '2021-02-21' | '2020-05-18': Server API version. More info on versioning can be found [here](https://docs.withpersona.com/versioning).

## Request body

- object
  - `data` ThemeSetsThemeSetIdPatchRequestBodyContentApplicationJsonSchemaData, required
    - `attributes` ThemeSetsThemeSetIdPatchRequestBodyContentApplicationJsonSchemaDataAttributes, required
      - `name` string: Display name of the theme set.
      - `styles` ThemeSetStyles: Nested theme tree. Sparse — any omitted cell falls back to the Persona default cascade. `dark` mirrors the structure of `light` and is fully optional. Requests carrying non-permitted or mistyped cells at any depth are rejected with a 400 naming each offending path; values that are structurally valid but cannot be reconciled into the stored theme (for example, shared button properties that disagree between the primary, secondary, and tertiary variants) are rejected with a 422.
        - `settings` ThemeSetStylesSettings
          - `use-dark-theme` boolean: Whether the dark variant is served to devices that prefer dark mode.
          - `preferred-theme-variant` string: Variant served when no device preference applies — one of "light" or "dark".
        - `light` ThemeSetVariant: One theme variant: `inquiry` holds flow chrome (navbar, modal, hosted flow), `components` holds the per-component style grid (component → variant → state → properties). Value leaves are typed objects such as `{ unit: hex, value: "#111111" }` (color), `{ unit: px, value: 16 }` (size), `{ x: ..., y: ... }` (dimensions) and `{ bitmask: 15 }` (corner mask). The accepted cells are exactly those of the Code-First theme-set YAML shape; a request containing a non-permitted or mistyped cell at any depth is rejected with a 400 naming each offending path. Values that pass the structural check but cannot be reconciled into the stored theme (for example, shared button properties that disagree between the primary, secondary, and tertiary variants) are rejected with a 422.
          - `inquiry` object
          - `components` object
          - `step-assets` object
        - `dark` ThemeSetVariant: One theme variant: `inquiry` holds flow chrome (navbar, modal, hosted flow), `components` holds the per-component style grid (component → variant → state → properties). Value leaves are typed objects such as `{ unit: hex, value: "#111111" }` (color), `{ unit: px, value: 16 }` (size), `{ x: ..., y: ... }` (dimensions) and `{ bitmask: 15 }` (corner mask). The accepted cells are exactly those of the Code-First theme-set YAML shape; a request containing a non-permitted or mistyped cell at any depth is rejected with a 400 naming each offending path. Values that pass the structural check but cannot be reconciled into the stored theme (for example, shared button properties that disagree between the primary, secondary, and tertiary variants) are rejected with a 422.
          - `inquiry` object
          - `components` object
          - `step-assets` object

## Response `200`

This endpoint returns a Theme Set object.

- ThemeSetsUpdateAThemeSetResponse200
  - `data` ThemeSet, required: A Theme Set object
    - `type` 'theme-set'
    - `id` string: Unique identifier of the theme set (starts with "theset_").
    - `attributes` ThemeSetAttributes
      - `name` string: Display name of the theme set.
      - `status` string: Lifecycle status — one of "active" or "archived". Archived theme sets are retained but no longer editable.
      - `styles` ThemeSetStyles: Nested theme tree. Sparse — any omitted cell falls back to the Persona default cascade. `dark` mirrors the structure of `light` and is fully optional. Requests carrying non-permitted or mistyped cells at any depth are rejected with a 400 naming each offending path; values that are structurally valid but cannot be reconciled into the stored theme (for example, shared button properties that disagree between the primary, secondary, and tertiary variants) are rejected with a 422.
        - `settings` ThemeSetStylesSettings
          - `use-dark-theme` boolean: Whether the dark variant is served to devices that prefer dark mode.
          - `preferred-theme-variant` string: Variant served when no device preference applies — one of "light" or "dark".
        - `light` ThemeSetVariant: One theme variant: `inquiry` holds flow chrome (navbar, modal, hosted flow), `components` holds the per-component style grid (component → variant → state → properties). Value leaves are typed objects such as `{ unit: hex, value: "#111111" }` (color), `{ unit: px, value: 16 }` (size), `{ x: ..., y: ... }` (dimensions) and `{ bitmask: 15 }` (corner mask). The accepted cells are exactly those of the Code-First theme-set YAML shape; a request containing a non-permitted or mistyped cell at any depth is rejected with a 400 naming each offending path. Values that pass the structural check but cannot be reconciled into the stored theme (for example, shared button properties that disagree between the primary, secondary, and tertiary variants) are rejected with a 422.
          - `inquiry` object
          - `components` object
          - `step-assets` object
        - `dark` ThemeSetVariant: One theme variant: `inquiry` holds flow chrome (navbar, modal, hosted flow), `components` holds the per-component style grid (component → variant → state → properties). Value leaves are typed objects such as `{ unit: hex, value: "#111111" }` (color), `{ unit: px, value: 16 }` (size), `{ x: ..., y: ... }` (dimensions) and `{ bitmask: 15 }` (corner mask). The accepted cells are exactly those of the Code-First theme-set YAML shape; a request containing a non-permitted or mistyped cell at any depth is rejected with a 400 naming each offending path. Values that pass the structural check but cannot be reconciled into the stored theme (for example, shared button properties that disagree between the primary, secondary, and tertiary variants) are rejected with a 422.
          - `inquiry` object
          - `components` object
          - `step-assets` object
      - `created-at` string, date-time
      - `updated-at` string, date-time
      - `archived-at` string, date-time, nullable: Set when the theme set is archived.

## Other responses

- `400`: The request was unacceptable, often due to invalid parameters.
- `401`: An invalid API key was provided.
- `403`: The given API key doesn’t have permissions to perform the request or a quota has been exceeded.
- `404`: The requested resource doesn’t exist.
- `409`: The request conflicts with another request, often due to attempting to create a duplicate resource.
- `422`: The request modifies the resource in an unacceptable way, often due to an invalid action or parameter.
- `429`: Your organization’s rate limit has been exceeded. We recommend an exponential backoff on requests.

---

[API](https://skmtc.dev/withpersona/apis/withpersona-4.md) - [All operations](https://skmtc.dev/withpersona/apis/withpersona-4/llms.txt) - [OpenAPI document](https://skmtc.dev/withpersona/apis/withpersona-4/revisions/2eddd7dae374?raw)
