> ## 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 configuration

> This API changes the configuration of a custom theme. Send at least one field. Built-in themes cannot be changed: clone the theme first. Header text and search input text are workspace settings, so change them with [Update organization settings](/api/settings/update). 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/{theme_id}/configuration
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/{theme_id}/configuration:
    patch:
      tags:
        - Themes
      summary: Update theme configuration
      description: >-
        This API changes the configuration of a custom theme. Send at least one
        field. Built-in themes cannot be changed: clone the theme first. Header
        text and search input text are workspace settings, so change them with
        [Update organization settings](/api/settings/update). 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_parent_path_param'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update_theme_configuration_request'
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  configuration:
                    $ref: '#/components/schemas/theme_configuration'
        '401':
          $ref: '#/components/responses/unauthorized_response'
        '403':
          $ref: '#/components/responses/forbidden_response'
        '404':
          $ref: '#/components/responses/not_found_response'
        '422':
          description: >-
            Unprocessable Entity - The theme is built-in, a color name is
            unknown, a font is not a font of this theme, a signed ID is invalid,
            `brand_image_height` is blank, or no field was sent
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: >-
                      Built-in themes cannot be changed. Clone the theme to get
                      one that can.
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_parent_path_param:
      in: path
      name: theme_id
      description: >-
        Unique identifier of the theme. Get it from [List
        themes](/api/themes/list).
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    update_theme_configuration_request:
      type: object
      required:
        - configuration
      properties:
        configuration:
          type: object
          description: Send at least one field.
          properties:
            title_font_id:
              type: string
              format: uuid
              description: Must be a font of this theme.
            body_font_id:
              type: string
              format: uuid
              description: Must be a font of this theme.
            brand_image_height:
              type: integer
              description: Cannot be blank.
            custom_css:
              type: string
              description: Pass an empty string to clear it.
            colors:
              type: object
              additionalProperties:
                type: string
              description: >-
                Merged into the current colors. An unknown color name is
                refused.
              example:
                header-bg: '#000000'
            brand_image:
              type: string
              description: >-
                Signed ID of an uploaded file. Get one from [Upload
                attachment](/api/attachments/create).
            header_image:
              type: string
              description: >-
                Signed ID of an uploaded file. Get one from [Upload
                attachment](/api/attachments/create).
    theme_configuration:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title_font_id:
          type: string
          format: uuid
          nullable: true
        body_font_id:
          type: string
          format: uuid
          nullable: true
        title_font_name:
          type: string
          nullable: true
        body_font_name:
          type: string
          nullable: true
        colors:
          type: object
          additionalProperties:
            type: string
        brand_image_height:
          type: integer
          example: 30
        custom_css:
          type: string
          nullable: true
          description: Always null for built-in themes.
        brand_image_url:
          type: string
          nullable: true
        header_image_url:
          type: string
          nullable: true
        typographs:
          type: array
          items:
            $ref: '#/components/schemas/font'
    font:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: Roboto
        weights:
          type: string
          example: 400,700
  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.