> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.neetokb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update theme

> This API renames a custom theme. Built-in themes cannot be renamed and return 404. The `put` method works too. For CLI sessions, this needs the Manage themes permission.

> [!NOTE]
>
> Replace `{your-subdomain}` with your workspace's subdomain. \
> Learn how to find your subdomain in [Workspace subdomain](https://apidocs.neetokb.com/api/workspace-subdomain.md).


## OpenAPI

````yaml bundled/themes.yaml PATCH /themes/{id}
openapi: 3.0.3
info:
  title: NeetoKB Themes API
  description: >-
    APIs to manage the themes, theme settings and fonts of the knowledge base
    site.
  version: 1.0.0
servers:
  - description: NeetoKB API
    url: https://{your-subdomain}.neetokb.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/api/workspace-subdomain).
security: []
paths:
  /themes/{id}:
    patch:
      tags:
        - Themes
      summary: Update theme
      description: >-
        This API renames a custom theme. Built-in themes cannot be renamed and
        return 404. The `put` method works too. For CLI sessions, this needs the
        Manage themes permission.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/theme_id_path_param'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - theme
              properties:
                theme:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Spring
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  theme:
                    $ref: '#/components/schemas/theme'
        '400':
          description: Bad Request - The `theme` key is missing or empty
        '401':
          $ref: '#/components/responses/unauthorized_response'
        '403':
          $ref: '#/components/responses/forbidden_response'
        '404':
          $ref: '#/components/responses/not_found_response'
        '422':
          description: Unprocessable Entity - `name` is missing or blank
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Name can't be blank
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/api/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
    theme_id_path_param:
      in: path
      name: id
      description: >-
        Unique identifier of the theme. Get it from [List
        themes](/api/themes/list).
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    theme:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: Default Theme
        system:
          type: boolean
          description: >-
            True for a built-in theme. Built-in themes cannot be changed or
            deleted.
        published:
          type: boolean
        base_theme_name:
          type: string
          nullable: true
          example: Default Theme
        colors:
          type: object
          additionalProperties:
            type: string
          example:
            header-bg: '#ffffff'
  responses:
    unauthorized_response:
      description: Unauthorized - API key is missing or invalid
    forbidden_response:
      description: >-
        Forbidden - The CLI session does not have the permission this change
        needs
    not_found_response:
      description: Not Found - The record does not exist in this workspace
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Not found.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.