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

# Get form

> Returns a form configured for a group, including its fields.

**Required scopes:** <Tooltip tip="Required for the `prechat` and `postchat` survey forms.">`surveys_read`</Tooltip> or <Tooltip tip="Required for custom forms.">`forms_manage`</Tooltip>


## OpenAPI

````yaml /api/configuration/v3.7/openapi.json post /action/get_form
openapi: 3.1.0
info:
  title: Configuration API
  version: v3.7
servers:
  - url: https://api.livechatinc.com/v3.7/configuration
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken: []
paths:
  /action/get_form:
    post:
      tags:
        - Forms
      summary: Get form
      description: Returns a form configured for a group, including its fields.
      operationId: get-form
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FormSelectorRequest'
            example:
              type: prechat
              group_id: 0
      responses:
        '200':
          description: The requested form.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormResponse'
              example:
                form:
                  id: '1'
                  type: prechat
                  enabled: true
                  fields:
                    - id: 153925275950librarydetails
                      type: name
                      label: Name
                      required: true
                    - id: 153925275950libraryemail
                      type: email
                      label: Email
                      required: true
                    - id: 153925275950librarytopics
                      type: checkbox
                      label: Pick topics
                      required: false
                      answers:
                        - label: Billing
                          checked: true
                        - label: Support
                          checked: false
components:
  schemas:
    FormSelectorRequest:
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/FormType'
        group_id:
          type: integer
          default: 0
          description: The ID of the group that owns the form.
    FormResponse:
      type: object
      required:
        - form
      properties:
        form:
          $ref: '#/components/schemas/Form'
    FormType:
      type: string
      enum:
        - prechat
        - postchat
        - offline
        - queued
        - email
        - ask_for_email
        - ask_for_email_mm
      description: >-
        The form type:

        - `prechat` and `postchat` — Survey forms.

        - `offline`, `queued`, `email`, `ask_for_email`, and `ask_for_email_mm`
        — Custom forms.
    Form:
      type: object
      required:
        - id
        - type
        - fields
      properties:
        id:
          type: string
          description: The form ID.
        type:
          $ref: '#/components/schemas/FormType'
        enabled:
          type: boolean
          description: >-
            If `true`, the survey form is enabled. Custom forms do not use this
            field.
        fields:
          type: array
          maxItems: 20
          items:
            $ref: '#/components/schemas/FormField'
          description: The form fields in display order.
    FormField:
      type: object
      required:
        - type
        - label
        - required
      properties:
        id:
          type: string
          description: >-
            The field ID. The server assigns this value and ignores it in update
            requests.
        type:
          type: string
          enum:
            - header
            - name
            - email
            - email_with_confirmation
            - question
            - radio
            - select
            - checkbox
            - group
            - textarea
            - rating
            - subject
          description: >-
            The field type. Each form type supports these field types:

            - `prechat` — `header`, `name`, `email`, `email_with_confirmation`,
            `question`, `radio`, `select`, `checkbox`, and `group`.

            - `postchat` — `header`, `question`, `radio`, `select`, `checkbox`,
            `textarea`, and `rating`.

            - `offline`, `ask_for_email`, and `ask_for_email_mm` — `header`,
            `name`, `question`, `email`, `radio`, `select`, `checkbox`,
            `textarea`, and `subject`.

            - `queued` — `header`.

            - `email` — `email`.


            A survey form can contain at most one `group` field and one
            `email_with_confirmation` field. An `ask_for_email` form must
            contain an `email` field.
        label:
          type: string
          description: >-
            The field label. Required when `fields` is provided. Cannot contain
            tab characters.
        required:
          type: boolean
          description: >-
            If `true`, the field requires a value. Required when `fields` is
            provided.
        answers:
          type: array
          maxItems: 350
          items:
            $ref: '#/components/schemas/FormAnswer'
          description: >-
            Answers available for the field. Required for `radio`, `select`,
            `checkbox`, and `group` fields.
        comment_label:
          type: string
          description: >-
            The comment label. Required for `rating` fields. Applies only to
            survey forms.
        confirmation_text:
          type: string
          description: >-
            The confirmation text. Required for `email_with_confirmation`
            fields. Applies only to survey forms.
        confirmation_checked:
          type: boolean
          description: >-
            If `true`, the confirmation is selected by default. Applies only to
            `email_with_confirmation` fields in survey forms.
    FormAnswer:
      type: object
      required:
        - label
      properties:
        label:
          type: string
          description: >-
            The answer label. Required when `answers` is provided. Cannot
            contain tab characters.
        checked:
          type: boolean
          description: >-
            If `true`, the answer is selected by default. For survey forms, this
            field is required for `radio`, `select`, and `checkbox` fields. Only
            one answer can be selected for `radio` and `select` fields. Custom
            forms ignore this field.
        destination_group:
          type: integer
          description: >-
            The ID of the group to which Text routes the customer when the
            answer is selected. Required for answers in a `group` field. Applies
            only to survey forms and is ignored for custom forms.
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: basic
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
    OAuth2BearerToken:
      type: http
      scheme: bearer
      description: Authenticate using an OAuth 2.0 Bearer token.
      x-example: us-south1:MQraNrGCsoJvtxD7KNJQB1kM3d5

````