FormAssembly Themes API

Manage CSS themes applied to forms

OpenAPI Specification

formassembly-themes-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: FormAssembly REST Admin Themes API
  description: 'REST API for managing FormAssembly forms, responses, themes, connectors, form elements, and account data. Supports JSON, XML, CSV, and ZIP response formats. OAuth2 authentication is required for all requests. Endpoints vary by deployment edition including Developer Sandbox, FormAssembly.com cloud, and self-hosted Enterprise instances.

    '
  version: 1.0.0
  contact:
    name: FormAssembly Developer Hub
    url: https://help.formassembly.com/help/working-with-the-formassembly-api
  termsOfService: https://www.formassembly.com/terms-of-service/
  license:
    name: Proprietary
servers:
- url: https://app.formassembly.com
  description: FormAssembly.com Cloud
- url: https://developer.formassembly.com
  description: Developer Sandbox
- url: https://{instance_name}.tfaforms.net
  description: Enterprise / Teams / Government Instance
  variables:
    instance_name:
      default: yourinstance
      description: Your FormAssembly enterprise instance name
security:
- oauth2: []
tags:
- name: Themes
  description: Manage CSS themes applied to forms
paths:
  /api_v1/themes/index.json:
    get:
      operationId: listThemes
      summary: List user themes
      description: Returns all themes belonging to the authenticated user.
      tags:
      - Themes
      responses:
        '200':
          description: List of themes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThemeList'
  /admin/api_v1/themes/view/{themeId}.json:
    get:
      operationId: getTheme
      summary: View theme CSS (Admin)
      description: Returns the CSS content and metadata for the specified theme.
      tags:
      - Themes
      parameters:
      - $ref: '#/components/parameters/themeId'
      responses:
        '200':
          description: Theme definition
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Theme'
        '404':
          description: Theme not found
  /admin/api_v1/themes/create.json:
    post:
      operationId: createTheme
      summary: Create a theme (Admin)
      description: Creates a new CSS theme for use with forms.
      tags:
      - Themes
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Display name for the theme
                css_data:
                  type: string
                  description: Full CSS stylesheet content
      responses:
        '200':
          description: Theme created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Theme'
  /admin/api_v1/themes/edit/{themeId}.json:
    post:
      operationId: updateTheme
      summary: Update a theme (Admin)
      description: Updates the name and/or CSS of an existing theme.
      tags:
      - Themes
      parameters:
      - $ref: '#/components/parameters/themeId'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  type: string
                css_data:
                  type: string
      responses:
        '200':
          description: Theme updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Theme'
        '404':
          description: Theme not found
  /admin/api_v1/themes/delete/{themeId}.json:
    post:
      operationId: deleteTheme
      summary: Delete a theme (Admin)
      description: Permanently removes the specified theme.
      tags:
      - Themes
      parameters:
      - $ref: '#/components/parameters/themeId'
      responses:
        '200':
          description: Theme deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '404':
          description: Theme not found
components:
  schemas:
    ThemeList:
      type: object
      properties:
        themes:
          type: array
          items:
            $ref: '#/components/schemas/Theme'
    SuccessResponse:
      type: object
      properties:
        status:
          type: string
          enum:
          - success
        message:
          type: string
    Theme:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier of the theme
        name:
          type: string
          description: Display name of the theme
        css_data:
          type: string
          description: CSS stylesheet content of the theme
  parameters:
    themeId:
      name: themeId
      in: path
      description: Unique identifier of the theme
      required: true
      schema:
        type: integer
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.formassembly.com/oauth/login
          tokenUrl: https://app.formassembly.com/oauth/access_token
          scopes: {}
externalDocs:
  description: FormAssembly API Documentation
  url: https://help.formassembly.com/help/working-with-the-formassembly-api