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

# Submit Form Response

> Submit form response data.

Two modes:
- task_id provided: saves response to database linked to the task
- task_id not provided (canvas-only): validates and returns data without saving



## OpenAPI

````yaml /openapi.json post /api/v1/brief-forms/{form_id}/submit
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/brief-forms/{form_id}/submit:
    post:
      tags:
        - Brief Forms
      summary: Submit Form Response
      description: >-
        Submit form response data.


        Two modes:

        - task_id provided: saves response to database linked to the task

        - task_id not provided (canvas-only): validates and returns data without
        saving
      operationId: submit_form_response_api_v1_brief_forms__form_id__submit_post
      parameters:
        - name: form_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Form Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BriefFormSubmitRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BriefFormResponseData'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BriefFormSubmitRequest:
      properties:
        form_id:
          type: string
          format: uuid
          title: Form Id
        form_version:
          type: integer
          title: Form Version
        response_data:
          additionalProperties: true
          type: object
          title: Response Data
          description: Form response validated against schema
        task_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Task Id
          description: Link to a task (NULL for canvas-only submissions)
      type: object
      required:
        - form_id
        - form_version
        - response_data
      title: BriefFormSubmitRequest
      description: Submit form response data (for a task or canvas execution).
    BriefFormResponseData:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        task_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Task Id
        form_id:
          type: string
          format: uuid
          title: Form Id
        form_version:
          type: integer
          title: Form Version
        response_data:
          additionalProperties: true
          type: object
          title: Response Data
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - form_id
        - form_version
        - response_data
        - created_at
      title: BriefFormResponseData
      description: Submitted form response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````