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

# Reply to form

> Submit an answer to a pending form.



## OpenAPI

````yaml /openapi.json post /api/session/{sessionID}/form/{formID}/reply
openapi: 3.1.0
info:
  title: opencode HttpApi
  version: 0.0.1
  description: Experimental HttpApi surface for selected instance routes.
servers: []
security: []
tags:
  - name: health
  - name: server
  - name: location
  - name: agent
  - name: plugin
    description: Experimental plugin routes.
  - name: session
    description: Experimental session routes.
  - name: session
    description: Experimental message routes.
  - name: model
    description: Experimental model routes.
  - name: generate
    description: Experimental one-shot generation routes.
  - name: provider
    description: Experimental provider routes.
  - name: integration
    description: Integration discovery and authentication routes.
  - name: mcp
    description: MCP server and resource routes.
  - name: credential
  - name: project
    description: Location-scoped project routes.
  - name: form
    description: Session form routes.
  - name: permission
    description: Experimental permission routes.
  - name: filesystem
    description: Experimental location-scoped filesystem routes.
  - name: command
    description: Experimental command routes.
  - name: skill
    description: Experimental skill routes.
  - name: event
    description: Experimental event stream routes.
  - name: pty
    description: Experimental location-scoped PTY routes.
  - name: shell
    description: Experimental location-scoped shell command routes.
  - name: question
    description: Experimental session question routes.
  - name: reference
    description: Location-scoped project references.
  - name: projectCopy
    description: Project copy management routes.
  - name: vcs
    description: Location-scoped version control routes.
  - name: debug
paths:
  /api/session/{sessionID}/form/{formID}/reply:
    post:
      tags:
        - form
      summary: Reply to form
      description: Submit an answer to a pending form.
      operationId: v2.session.form.reply
      parameters:
        - name: sessionID
          in: path
          schema:
            type: string
          required: true
        - name: formID
          in: path
          schema:
            type: string
            allOf:
              - pattern: ^frm_
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Form.Reply'
        required: true
      responses:
        '204':
          description: <No Content>
        '400':
          description: FormInvalidAnswerError | InvalidRequestError
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/FormInvalidAnswerError'
                  - $ref: '#/components/schemas/InvalidRequestError'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: SessionNotFoundError | FormNotFoundError
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/FormNotFoundError'
                  - $ref: '#/components/schemas/SessionNotFoundError'
                  - $ref: '#/components/schemas/SessionNotFoundError'
        '409':
          description: FormAlreadySettledError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormAlreadySettledError'
      security: []
components:
  schemas:
    Form.Reply:
      type: object
      properties:
        answer:
          $ref: '#/components/schemas/Form.Answer'
      required:
        - answer
      additionalProperties: false
    FormInvalidAnswerError:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - FormInvalidAnswerError
        id:
          type: string
        message:
          type: string
      required:
        - _tag
        - id
        - message
      additionalProperties: false
    InvalidRequestError:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - InvalidRequestError
        message:
          type: string
        kind:
          anyOf:
            - type: string
            - type: 'null'
        field:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - _tag
        - message
      additionalProperties: false
    UnauthorizedError:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - UnauthorizedError
        message:
          type: string
      required:
        - _tag
        - message
      additionalProperties: false
    FormNotFoundError:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - FormNotFoundError
        id:
          type: string
        message:
          type: string
      required:
        - _tag
        - id
        - message
      additionalProperties: false
    SessionNotFoundError:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - SessionNotFoundError
        sessionID:
          type: string
        message:
          type: string
      required:
        - _tag
        - sessionID
        - message
      additionalProperties: false
    FormAlreadySettledError:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - FormAlreadySettledError
        id:
          type: string
        message:
          type: string
      required:
        - _tag
        - id
        - message
      additionalProperties: false
    Form.Answer:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/Form.Value'
    Form.Value:
      anyOf:
        - type: string
        - anyOf:
            - anyOf:
                - type: number
                - type: string
                  enum:
                    - NaN
                - type: string
                  enum:
                    - Infinity
                - type: string
                  enum:
                    - '-Infinity'
            - type: string
              enum:
                - Infinity
                - '-Infinity'
                - NaN
        - type: boolean
        - type: array
          items:
            type: string

````