---
title: "Update a knowledge base theme draft"
method: PATCH
path: "/knowledge-bases/{id}/themes/{theme_id}"
tags: ["knowledge-base-themes"]
---

# Update a knowledge base theme draft

`PATCH /knowledge-bases/{id}/themes/{theme_id}`

Replaces one or more complete theme files in a single atomic draft update. Use the publish endpoint to make the changes live.

**Rate limit:** 20 requests per minute

## Path parameters

- `id` string, required
- `theme_id` string, required

## Request body

- UpdateKnowledgeBaseThemeRequestBody
  - `assets` UpdateKnowledgeBaseThemeAsset[], required — The complete theme files to replace. Changes are saved as drafts and are not published.
    - `asset_type` string, required — The type of theme asset. One of article, collection, css, footer, header, homepage, or scripts.
    - `content` string, required — The complete replacement content for the asset.

## Response `200`

- UpdateKnowledgeBaseThemeResponseBody
  - `data` KnowledgeBaseTheme
    - `assets` KnowledgeBaseThemeAsset[] — The editable files in the theme.
      - `asset_type` string — The type of theme asset. One of article, collection, css, footer, header, homepage, or scripts.
      - `content` string — The complete current content, including unpublished changes.
      - `has_unpublished_changes` boolean — Whether this asset has changes that have not been published.
      - `published_content` string — The complete published content. Omitted if the asset has never been published.
    - `has_unpublished_changes` boolean — Whether any theme asset has changes that have not been published.
    - `id` string — The ID of the theme.
    - `knowledge_base_id` string — The ID of the knowledge base that owns the theme.
    - `name` string — The name of the theme.
  - `request_id` string — The request ID for tracking.

## Other responses

- `400` — The request was invalid or could not be completed.
- `404`
- `500` — An unexpected internal error occurred.

---

[API](https://skmtc.net/usepylon/apis/pylon-api.md) · [All operations](https://skmtc.net/usepylon/apis/pylon-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usepylon/pylon-api/revisions/a7231589e927/schema)
