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

# Get the form theme

> **Required scope:** `form:read`.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v1/forms/{form_token}/theme
openapi: 3.0.1
info:
  title: FormHug API V1
  version: v1
  description: |
    FormHug public REST API. All request/response keys are snake_case.

    Successful response:

    ```json
    {
      "data": { ... }
    }
    ```

    Paginated response:

    ```json
    {
      "data": [ ... ],
      "pagination": {
        "total": 123,
        "next_cursor": "NQ=="
      }
    }
    ```

    Error response:

    ```json
    {
      "error": "Human-readable message",
      "error_details": [
        { "attribute": "field_name", "message": "specific error" }
      ]
    }
    ```

    `error_details` only appears for model validation failures.
servers:
  - url: https://formhug.ai
security: []
tags:
  - name: Forms
    description: Form CRUD
  - name: Attachments
    description: >-
      2-step upload for form-element images (theme, rich-text, or field-element
      images). Prepare returns an `upload_id`; consume it in a theme update,
      attachment_commitments, or the form `fields` payload depending on purpose.
  - name: Entries
    description: Entries collected by a form owned by the current user
  - name: Folders
    description: Folder CRUD
  - name: Participated Forms
    description: Forms the current user has submitted to (does not own)
  - name: Published Form Entries
    description: Submit entries to a published form
  - name: Published Forms
    description: Read a published form's public structure for filling
  - name: Entry Attachments
    description: >-
      2-step upload for `attachment` field submissions. Prepare returns an
      `upload_id`; submit it under the attachment field in `field_values` when
      creating the entry.
  - name: Me
    description: Current authenticated user
  - name: Webhooks
    description: Webhook integrations attached to a form
  - name: Form Themes
    description: Read and update a form's visual theme
  - name: Form Settings
    description: >-
      Per-form settings — submission flow, availability, access control,
      presentation
  - name: Field Rules
    description: >-
      Read and replace a form's conditional field-display and post-submission
      redirect rules.
  - name: OAuth
    description: OAuth 2.0 PKCE token issuance and revocation
paths:
  /api/v1/forms/{form_token}/theme:
    parameters:
      - name: form_token
        in: path
        description: Form token
        required: true
        schema:
          type: string
    get:
      tags:
        - Form Themes
      summary: Get the form theme
      description: '**Required scope:** `form:read`.'
      responses:
        '200':
          description: With header image
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - header
                      - wallpaper
                      - primary_color
                      - submit_button
                      - typography
                      - general_button
                    properties:
                      header:
                        type: object
                        required:
                          - images
                        properties:
                          images:
                            type: array
                            description: >-
                              Header images; empty array when no header image is
                              set.
                            items:
                              type: object
                              required:
                                - url
                                - id
                              properties:
                                url:
                                  type: string
                                  format: uri
                                  description: Header image visit URL at size xlarge.
                                id:
                                  type: string
                                  description: Attachment id.
                      wallpaper:
                        type: object
                        required:
                          - color
                          - image
                        properties:
                          color:
                            type: string
                            nullable: true
                            description: >-
                              CSS color string of the form background; null when
                              unset.
                          image:
                            type: object
                            nullable: true
                            required:
                              - url
                              - id
                            properties:
                              url:
                                type: string
                                format: uri
                              id:
                                type: string
                      primary_color:
                        type: string
                        nullable: true
                      submit_button:
                        type: object
                        required:
                          - style
                        properties:
                          style:
                            type: object
                            required:
                              - background_color
                              - color
                            properties:
                              background_color:
                                type: string
                                nullable: true
                              color:
                                type: string
                                nullable: true
                      typography:
                        type: object
                        required:
                          - form_header
                          - field_label
                          - choice_style
                        properties:
                          form_header:
                            type: object
                            required:
                              - font_size
                              - color
                              - font_weight
                              - text_align
                            properties:
                              font_size:
                                type: string
                                nullable: true
                                enum:
                                  - 14px
                                  - 15px
                                  - 16px
                                  - 20px
                                  - 24px
                                  - 28px
                                  - 36px
                                  - 40px
                                  - null
                              color:
                                type: string
                                nullable: true
                              font_weight:
                                type: string
                                nullable: true
                                enum:
                                  - bold
                                  - normal
                                  - null
                              text_align:
                                type: string
                                nullable: true
                                enum:
                                  - left
                                  - center
                                  - right
                                  - null
                          field_label:
                            type: object
                            required:
                              - font_size
                              - color
                              - font_weight
                            properties:
                              font_size:
                                type: string
                                nullable: true
                                enum:
                                  - 14px
                                  - 15px
                                  - 16px
                                  - 17px
                                  - 18px
                                  - 19px
                                  - 20px
                                  - 22px
                                  - 24px
                                  - null
                              color:
                                type: string
                                nullable: true
                              font_weight:
                                type: string
                                nullable: true
                                enum:
                                  - bold
                                  - normal
                                  - null
                          choice_style:
                            type: object
                            required:
                              - font_size
                              - color
                              - font_weight
                            properties:
                              font_size:
                                type: string
                                nullable: true
                                enum:
                                  - 14px
                                  - 15px
                                  - 16px
                                  - 17px
                                  - 18px
                                  - 19px
                                  - 20px
                                  - 22px
                                  - 24px
                                  - null
                              color:
                                type: string
                                nullable: true
                              font_weight:
                                type: string
                                nullable: true
                                enum:
                                  - bold
                                  - normal
                                  - null
                      general_button:
                        type: object
                        required:
                          - font_size
                          - color
                          - font_weight
                          - border_color
                          - border_width
                        properties:
                          font_size:
                            type: string
                            nullable: true
                            enum:
                              - 14px
                              - 15px
                              - 16px
                              - 17px
                              - 18px
                              - 19px
                              - 20px
                              - 22px
                              - 24px
                              - null
                          color:
                            type: string
                            nullable: true
                          font_weight:
                            type: string
                            nullable: true
                            enum:
                              - bold
                              - normal
                              - null
                          border_color:
                            type: string
                            nullable: true
                          border_width:
                            type: string
                            nullable: true
                            enum:
                              - 0px
                              - 1px
                              - 2px
                              - 3px
                              - 4px
                              - 5px
                              - null
                      form_container:
                        type: object
                        required:
                          - style
                        properties:
                          style:
                            type: object
                            required:
                              - background_color
                            properties:
                              background_color:
                                type: string
                                nullable: true
        '403':
          description: PAT scope is insufficient
          content:
            application/json:
              examples:
                insufficient_scope:
                  value:
                    error: Insufficient scope
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Form not found or not owned by current user
          content:
            application/json:
              examples:
                not_found:
                  value:
                    error: Form not found
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - PersonalAccessToken:
            - form:read
components:
  schemas:
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: PAT
      description: >
        Personal Access Token prefixed with `fh_`. Sent as `Authorization:
        Bearer fh_xxx`.

        The scope required by each endpoint is listed in that endpoint's
        description.

````