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

# Create a theme



## OpenAPI

````yaml /openapi.json post /v1/themes
openapi: 3.1.0
info:
  title: Propal Public API
  version: 1.0.0
  description: >-
    Public REST API for Propal — proposals, leads, catalog, templates, themes,
    media, metrics, and organization. An MCP (Model Context Protocol) endpoint
    is also available at `POST /v1/mcp` for AI agents — it requires the
    `mcp:use` scope and exposes the same resources as tools, plus prefab section
    templates to compose proposals.
servers:
  - url: https://api.propal.io
    description: Production
security: []
paths:
  /v1/themes:
    post:
      tags:
        - Themes
      summary: Create a theme
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                font:
                  type: string
                  enum:
                    - inter
                    - helvetica
                    - satoshi
                    - poppins
                    - outfit
                    - plus_jakarta
                title_font:
                  type: string
                  enum:
                    - inter
                    - helvetica
                    - satoshi
                    - poppins
                    - outfit
                    - plus_jakarta
                body_font:
                  type: string
                  enum:
                    - inter
                    - helvetica
                    - satoshi
                    - poppins
                    - outfit
                    - plus_jakarta
                body_theme:
                  type: string
                  enum:
                    - white
                    - gray
                    - outlined
                    - black
                color_accent:
                  type: string
                  enum:
                    - blue
                    - green
                    - purple
                    - red
                    - orange
                    - black
                colors:
                  type: object
                  properties:
                    bg:
                      type: string
                      description: Page background color (hex/css).
                    headingColor:
                      type: string
                      description: Page heading color.
                    textColor:
                      type: string
                      description: Page body text color.
                    cardBg:
                      type: string
                      description: Card background on the page.
                    cardHeadingColor:
                      type: string
                      description: Card heading color on the page.
                    cardTextColor:
                      type: string
                      description: Card body text color on the page.
                    cardBorderColor:
                      type: string
                      description: Card border color on the page.
                    accentRaw:
                      type: string
                      description: Raw accent (legacy + accent v2 source).
                    accentColor:
                      type: string
                      description: Legacy accent foreground color.
                    accentBg:
                      type: string
                      description: Legacy accent background color.
                    accentContrast:
                      type: string
                      description: Contrast color for accent surfaces.
                    accentSolidBg:
                      type: string
                      description: Accent v2 solid bg.
                    accentSolidText:
                      type: string
                      description: Accent v2 solid text.
                    accentSubtleBg:
                      type: string
                      description: Accent v2 subtle bg.
                    accentSubtleText:
                      type: string
                      description: Accent v2 subtle text.
                    badgeBg:
                      type: string
                    badgeText:
                      type: string
                    badgeBorder:
                      type: string
                  required:
                    - bg
                    - headingColor
                    - textColor
                    - cardBg
                    - cardHeadingColor
                    - cardTextColor
                    - cardBorderColor
                    - accentColor
                    - accentBg
                    - accentContrast
                section_styles:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                        maxLength: 32
                        pattern: ^[a-zA-Z][a-zA-Z0-9_-]*$
                        description: >-
                          Optional human-readable slot name (e.g. "soft",
                          "deep"). Sections can then reference this slot via DSL
                          `section_style: "<id>"` instead of the positional
                          index. Survives reordering. Reserved: "default" and
                          digit-only strings.
                      bg:
                        type: string
                      headingColor:
                        type: string
                      textColor:
                        type: string
                      borderColor:
                        type: string
                      cardBg:
                        type: string
                      cardHeadingColor:
                        type: string
                      cardTextColor:
                        type: string
                      cardBorderColor:
                        type: string
                      badgeBg:
                        type: string
                      badgeText:
                        type: string
                      badgeBorder:
                        type: string
                    required:
                      - bg
                      - headingColor
                      - textColor
                      - borderColor
                      - cardBg
                      - cardHeadingColor
                      - cardTextColor
                      - cardBorderColor
                radius:
                  type: number
                  minimum: 0
                  maximum: 2
                  description: Border radius in rem, between 0 and 2 in 0.1 steps.
                button_radius:
                  type: number
                  minimum: 0
                  maximum: 2
                  description: Border radius in rem, between 0 and 2 in 0.1 steps.
                paragraph_margin_top:
                  type: number
                  minimum: 0
                  maximum: 96
                  description: >-
                    Default paragraph top margin in px, between 0 and 96 in 2
                    steps. Overridable per paragraph.
                is_default:
                  type: boolean
              required:
                - name
      responses:
        '201':
          description: Created theme
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  font:
                    type: string
                  body_theme:
                    type: string
                  color_accent:
                    type: string
                  colors:
                    type: object
                    additionalProperties:
                      nullable: true
                  section_styles:
                    nullable: true
                  radius:
                    type: number
                  button_radius:
                    type: number
                  is_default:
                    type: boolean
                  created_at:
                    type: string
                  updated_at:
                    type: string
                required:
                  - id
                  - name
                  - font
                  - body_theme
                  - color_accent
                  - colors
                  - radius
                  - button_radius
                  - is_default
                  - created_at
                  - updated_at
        '400':
          description: Validation error
        '401':
          description: Unauthorized — missing or invalid API key
        '403':
          description: Forbidden — API key missing required scope
        '404':
          description: Resource not found
        '429':
          description: Rate limit exceeded
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'API key in format: pp_live_xxxxxxxxxxxxxxxxxxxxxxxx'

````