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

# Render Form

> Get an online form as the blocks a client renders, and record the view.



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json get /workspaces/{workspace_id}/forms/{form_id}/render
openapi: 3.1.0
info:
  title: Tracecat API
  summary: Tracecat API
  description: The open source AI automation platform for security teams and agents.
  termsOfService: >-
    https://docs.google.com/document/d/e/2PACX-1vQvDe3SoVAPoQc51MgfGCP71IqFYX_rMVEde8zC4qmBCec5f8PLKQRdxa6tsUABT8gWAR9J-EVs2CrQ/pub
  contact:
    name: Tracecat Founders
    email: founders@tracecat.com
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1'
servers:
  - url: /api
security: []
tags:
  - name: public
    description: Public facing endpoints
  - name: workflows
    description: Workflow management
  - name: actions
    description: Action management
  - name: triggers
    description: Workflow triggers
  - name: secrets
    description: Secret management
  - name: variables
    description: Workspace variable management
paths:
  /workspaces/{workspace_id}/forms/{form_id}/render:
    get:
      tags:
        - forms
      summary: Render Form
      description: Get an online form as the blocks a client renders, and record the view.
      operationId: forms-render_form
      parameters:
        - name: form_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Form Id
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormPreview'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormErrorResponse'
          description: Conflict
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    FormPreview:
      properties:
        title:
          type: string
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        success_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Success Message
        definition_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Definition Version
          description: Published workflow version the blocks come from.
        config_version:
          type: string
          title: Config Version
          description: Version of the config the blocks come from.
        blocks:
          items:
            oneOf:
              - $ref: '#/components/schemas/FormHeadingBlock'
              - $ref: '#/components/schemas/FormTextBlock'
              - $ref: '#/components/schemas/FormNoticeBlock'
              - $ref: '#/components/schemas/FormDividerBlock'
              - $ref: '#/components/schemas/FormFieldBlock'
            discriminator:
              propertyName: type
              mapping:
                divider: '#/components/schemas/FormDividerBlock'
                field: '#/components/schemas/FormFieldBlock'
                heading: '#/components/schemas/FormHeadingBlock'
                notice: '#/components/schemas/FormNoticeBlock'
                text: '#/components/schemas/FormTextBlock'
          type: array
          title: Blocks
      type: object
      required:
        - title
        - config_version
        - blocks
      title: FormPreview
      description: What a form renders. Hidden and autofill fields never appear.
    FormErrorResponse:
      properties:
        detail:
          $ref: '#/components/schemas/FormErrorDetail'
      type: object
      required:
        - detail
      title: FormErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FormHeadingBlock:
      properties:
        type:
          type: string
          const: heading
          title: Type
        text:
          type: string
          title: Text
      type: object
      required:
        - type
        - text
      title: FormHeadingBlock
    FormTextBlock:
      properties:
        type:
          type: string
          const: text
          title: Type
        text:
          type: string
          title: Text
          description: Markdown.
      type: object
      required:
        - type
        - text
      title: FormTextBlock
    FormNoticeBlock:
      properties:
        type:
          type: string
          const: notice
          title: Type
        text:
          type: string
          title: Text
        tone:
          $ref: '#/components/schemas/FormNoticeTone'
      type: object
      required:
        - type
        - text
        - tone
      title: FormNoticeBlock
    FormDividerBlock:
      properties:
        type:
          type: string
          const: divider
          title: Type
      type: object
      required:
        - type
      title: FormDividerBlock
    FormFieldBlock:
      properties:
        type:
          type: string
          const: field
          title: Type
        name:
          type: string
          title: Name
        label:
          type: string
          title: Label
        help:
          anyOf:
            - type: string
            - type: 'null'
          title: Help
        placeholder:
          anyOf:
            - type: string
            - type: 'null'
          title: Placeholder
        widget:
          $ref: '#/components/schemas/FormWidget'
        required:
          type: boolean
          title: Required
        multiple:
          type: boolean
          title: Multiple
        default:
          title: Default
        options:
          anyOf:
            - items:
                $ref: '#/components/schemas/FormFieldOption'
              type: array
            - type: 'null'
          title: Options
        visible_if:
          anyOf:
            - $ref: '#/components/schemas/FormVisibleIf'
            - type: 'null'
        config:
          anyOf:
            - $ref: '#/components/schemas/FormFieldConfig'
            - type: 'null'
      type: object
      required:
        - type
        - name
        - label
        - widget
        - required
        - multiple
      title: FormFieldBlock
      description: An input the requester fills in.
    FormErrorDetail:
      properties:
        code:
          $ref: '#/components/schemas/FormErrorCode'
        message:
          type: string
          title: Message
        errors:
          anyOf:
            - items:
                $ref: '#/components/schemas/FormFieldError'
              type: array
            - type: 'null'
          title: Errors
          description: Per-field errors of a rejected submission.
        issues:
          anyOf:
            - items:
                $ref: '#/components/schemas/FormIssue'
              type: array
            - type: 'null'
          title: Issues
          description: Issues of a rejected form config.
      type: object
      required:
        - code
        - message
      title: FormErrorDetail
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    FormNoticeTone:
      type: string
      enum:
        - info
        - success
        - warning
        - danger
      title: FormNoticeTone
    FormWidget:
      type: string
      enum:
        - text
        - long_text
        - number
        - toggle
        - select
        - multi_select
        - cards
        - tags
        - date
        - datetime
        - user
        - file
      title: FormWidget
      description: Input controls a form field can render as.
    FormFieldOption:
      properties:
        value:
          type: string
          title: Value
        label:
          type: string
          title: Label
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        image:
          anyOf:
            - type: string
            - type: 'null'
          title: Image
      type: object
      required:
        - value
        - label
      title: FormFieldOption
    FormVisibleIf:
      properties:
        field:
          type: string
          maxLength: 255
          title: Field
        equals:
          anyOf:
            - type: boolean
            - type: integer
            - type: number
            - type: string
              maxLength: 255
          title: Equals
      additionalProperties: false
      type: object
      required:
        - field
        - equals
      title: FormVisibleIf
      description: Show a field only while another field has this value.
    FormFieldConfig:
      properties:
        accept:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Accept
        max_files:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Files
        max_file_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max File Size
          description: Largest file the field takes, in bytes.
      type: object
      title: FormFieldConfig
      description: Widget-specific settings.
    FormErrorCode:
      type: string
      enum:
        - not_found
        - already_exists
        - form_config_invalid
        - form_workflow_unpublished
        - form_offline
        - form_unavailable
        - form_changed
        - form_validation_error
        - workflow_start_failed
        - workflow_start_unconfirmed
        - file_field_invalid
        - file_invalid
        - file_type_not_allowed
        - file_too_large
        - file_limit_reached
        - file_upload_failed
      title: FormErrorCode
      description: Machine-readable failures of a forms request.
    FormFieldError:
      properties:
        field:
          type: string
          title: Field
        code:
          $ref: '#/components/schemas/FormFieldErrorCode'
        message:
          type: string
          title: Message
      type: object
      required:
        - field
        - code
        - message
      title: FormFieldError
    FormIssue:
      properties:
        severity:
          $ref: '#/components/schemas/FormIssueSeverity'
        code:
          $ref: '#/components/schemas/FormIssueCode'
        message:
          type: string
          title: Message
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Loc
          description: Path to the offending config key.
      type: object
      required:
        - severity
        - code
        - message
        - loc
      title: FormIssue
      description: A problem found while resolving a form config against its inputs.
    FormFieldErrorCode:
      type: string
      enum:
        - required
        - unknown_field
        - invalid_value
        - invalid_option
        - invalid_date
        - invalid_user
        - invalid_file
        - too_many_files
      title: FormFieldErrorCode
      description: Why a submitted value was rejected.
    FormIssueSeverity:
      type: string
      enum:
        - error
        - warning
      title: FormIssueSeverity
    FormIssueCode:
      type: string
      enum:
        - unknown_field
        - duplicate_field
        - incompatible_widget
        - no_widget_for_type
        - unsupported_widget_option
        - options_required
        - options_not_supported
        - option_not_in_enum
        - default_invalid
        - conditional_field_required
        - visible_if_unknown_field
        - visible_if_invalid_controller
        - visible_if_invalid_value
        - autofill_type_mismatch
        - hidden_with_autofill
        - unrendered_optional_input
        - integer_out_of_range
      title: FormIssueCode
      description: Problems the resolver finds in a form config.
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth
    ServiceAccountApiKeyBearer:
      type: http
      description: Tracecat service account API key.
      scheme: bearer

````

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