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

# Set the site theme

> Restyles the whole site: `tokens` is a PARTIAL patch merged onto the theme in force; `null` resets to the wondeya defaults. Colours are 6-digit hex; typefaces and radii are keys from the catalogue, and anything else is `wondeya.theme.invalid`.



## OpenAPI

````yaml /openapi.json patch /v1/projects/{projectId}/theme
openapi: 3.0.0
info:
  title: wondeya Developer API
  description: >-
    The public REST API for building on wondeya: agents, projects, pages,
    knowledge, assets, brand, theme, usage, retrieval and chat, authenticated by
    a workspace API key (`Authorization: Bearer wdy_live_…`).
  version: 0.1.0
  contact:
    name: wondeya
    url: https://wondeya.com
    email: team@wondeya.com
  license:
    name: Proprietary
    url: https://wondeya.com/terms
servers:
  - url: https://api.wondeya.com
    description: Production
  - url: http://localhost:8080
    description: Development
security: []
tags:
  - name: Identity
  - name: Agents
  - name: Projects
  - name: Pages
  - name: Knowledge
  - name: Assets
  - name: Brand
  - name: Usage
  - name: Chat
paths:
  /v1/projects/{projectId}/theme:
    patch:
      tags:
        - Brand
      summary: Set the site theme
      description: >-
        Restyles the whole site: `tokens` is a PARTIAL patch merged onto the
        theme in force; `null` resets to the wondeya defaults. Colours are
        6-digit hex; typefaces and radii are keys from the catalogue, and
        anything else is `wondeya.theme.invalid`.
      operationId: PublicBrandController_setTheme_v1
      parameters:
        - name: projectId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetPublicThemeDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicThemeDto'
        '400':
          description: '`wondeya.theme.invalid`: a token outside the closed set'
        '404':
          description: No such site in this workspace
      security:
        - api-key: []
components:
  schemas:
    SetPublicThemeDto:
      type: object
      properties:
        tokens:
          type: object
          additionalProperties: true
          nullable: true
          description: >-
            A partial token patch (e.g. `{"colors":{"primary":"#6d28d9"}}`), or
            `null` to reset to the wondeya defaults.
      required:
        - tokens
    PublicThemeDto:
      type: object
      properties:
        tokens:
          description: The tokens in force.
          allOf:
            - $ref: '#/components/schemas/ThemeTokensDto'
        cssVariables:
          type: object
          additionalProperties:
            type: string
          description: Ready-to-inject CSS custom properties, all values ours (D-9).
        customized:
          type: boolean
          description: False while the site is on the wondeya defaults.
        updatedAt:
          type: string
          format: date-time
      required:
        - tokens
        - cssVariables
        - customized
    ThemeTokensDto:
      type: object
      properties:
        colors:
          description: Six-digit hex only. Anything else is rejected, not cleaned.
          allOf:
            - $ref: '#/components/schemas/ThemeColorsDto'
        typography:
          $ref: '#/components/schemas/ThemeTypographyDto'
        radius:
          type: string
          enum:
            - none
            - sm
            - md
            - lg
            - full
          description: A key into a closed scale; the px value is the server’s.
      required:
        - colors
        - typography
        - radius
    ThemeColorsDto:
      type: object
      properties:
        primary:
          type: string
          example: '#6d28d9'
        accent:
          type: string
          example: '#22d3ee'
        surface:
          type: string
          example: '#ffffff'
        ink:
          type: string
          example: '#171717'
        muted:
          type: string
          example: '#737373'
      required:
        - primary
        - accent
        - surface
        - ink
        - muted
    ThemeTypographyDto:
      type: object
      properties:
        heading:
          type: string
          enum:
            - montserrat
            - inter
            - source-serif
        body:
          type: string
          enum:
            - montserrat
            - inter
            - source-serif
      required:
        - heading
        - body
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: opaque
      type: http
      description: >-
        A workspace API key: wdy_live_… / wdy_test_…. Created at POST
        /workspaces/{tenantId}/keys and shown exactly once.

````