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

# Create a theme

> Create a workspace theme as a copy of a base theme, then apply the given name and properties. Only the properties listed in the request body can be set.

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


## OpenAPI

````yaml bundled/themes.yaml POST /themes
openapi: 3.0.3
info:
  title: NeetoForm Themes APIs
  version: 2.0.0
servers:
  - description: NeetoForm APIs
    url: https://{your-subdomain}.neetoform.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/api/workspace-subdomain).
security: []
tags:
  - name: Themes
    description: APIs to manage themes and apply them to forms.
paths:
  /themes:
    post:
      tags:
        - Themes
      summary: Create a theme
      description: >-
        Create a workspace theme as a copy of a base theme, then apply the given
        name and properties. Only the properties listed in the request body can
        be set.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                theme:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Name of the new theme.
                      example: Brand
                    base_theme_id:
                      type: string
                      description: >-
                        ID of the theme to copy. It can be a system theme or a
                        workspace theme. The default theme is used when omitted.
                      example: 3b0d5c1e-2f7a-4c4e-9d1b-6a8f2e7c9b10
                    properties:
                      $ref: '#/components/schemas/theme_properties_param'
                  required:
                    - name
              required:
                - theme
      responses:
        '201':
          description: Created - Theme created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/theme_response'
        '400':
          description: Bad Request - The `theme` parameter is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
              example:
                error: 'param is missing or the value is empty: theme'
        '404':
          description: Not Found - The base theme does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
              example:
                error: NeetoThemesEngine::Theme does not exist.
        '422':
          description: Unprocessable Entity - A property cannot be set through the API
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
              example:
                error: >-
                  These theme properties cannot be set here: custom_css.
                  Editable properties: eui_font_family, question_color,
                  background_color, button_text_color, button_background_color,
                  button_border_radius, welcome_text_alignment,
                  questions_text_alignment, thank_you_text_alignment.
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
  schemas:
    theme_properties_param:
      type: object
      description: >-
        Theme properties to set, as key and value pairs. Only the keys listed
        here can be set. Any other key returns a 422 error.
      properties:
        eui_font_family:
          type: string
          description: CSS font-family stack used for all text.
          example: Inter, sans-serif
        question_color:
          type: string
          description: Question text color as a hex value.
          example: '#123456'
        background_color:
          type: string
          description: Page background color as a hex value.
          example: '#ffffff'
        button_text_color:
          type: string
          description: Button text color as a hex value.
          example: '#ffffff'
        button_background_color:
          type: string
          description: Button background color as a hex value.
          example: '#1a2b3c'
        button_border_radius:
          type: string
          description: Button corner radius in pixels.
          example: '10'
        welcome_text_alignment:
          type: string
          enum:
            - left
            - center
            - right
        questions_text_alignment:
          type: string
          enum:
            - left
            - center
            - right
        thank_you_text_alignment:
          type: string
          enum:
            - left
            - center
            - right
    theme_response:
      type: object
      properties:
        theme:
          $ref: '#/components/schemas/theme'
    error_response:
      type: object
      properties:
        error:
          type: string
    theme:
      allOf:
        - $ref: '#/components/schemas/theme_summary'
        - type: object
          properties:
            properties:
              type: array
              items:
                $ref: '#/components/schemas/theme_property'
            has_background_image:
              type: boolean
              example: false
    theme_summary:
      type: object
      properties:
        id:
          type: string
          example: 3b0d5c1e-2f7a-4c4e-9d1b-6a8f2e7c9b10
        name:
          type: string
          example: Brand
        is_system_theme:
          type: boolean
          description: >-
            `true` for themes provided by NeetoForm. System themes cannot be
            changed or deleted.
          example: false
    theme_property:
      type: object
      properties:
        key:
          type: string
          example: background_color
        kind:
          type: string
          example: color
        value:
          type: string
          nullable: true
          example: '#ffffff'

````

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