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

# Get all form templates



## OpenAPI

````yaml https://dev.flextell.ai/docs/api.json get /v1/form-templates
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: '## Flextell API'
servers:
  - url: https://dev.flextell.ai/api
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/form-templates:
    get:
      tags:
        - FormTemplate
      summary: Get all form templates
      operationId: formTemplate.index
      parameters:
        - name: per_page
          in: query
          description: The number of items per page.
          schema:
            type:
              - integer
              - 'null'
            minimum: 1
            maximum: 100
        - name: sort_by
          in: query
          description: The field to sort by.
          schema:
            type:
              - string
              - 'null'
            enum:
              - name
              - created_at
              - updated_at
              - is_active
        - name: sort_order
          in: query
          description: The sort direction (asc or desc).
          schema:
            type:
              - string
              - 'null'
            enum:
              - asc
              - desc
        - name: is_active
          in: query
          description: Filter by active status.
          schema:
            type:
              - string
              - 'null'
            enum:
              - '0'
              - '1'
              - 'true'
              - 'false'
        - name: search
          in: query
          description: The search query.
          schema:
            type:
              - string
              - 'null'
            maxLength: 255
        - name: trashed
          in: query
          description: Include only soft-deleted records.
          schema:
            type:
              - boolean
              - 'null'
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      responses:
        '200':
          description: Paginated set of `FormTemplateResource`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/FormTemplateResource'
                  links:
                    type: object
                    properties:
                      first:
                        type:
                          - string
                          - 'null'
                      last:
                        type:
                          - string
                          - 'null'
                      prev:
                        type:
                          - string
                          - 'null'
                      next:
                        type:
                          - string
                          - 'null'
                    required:
                      - first
                      - last
                      - prev
                      - next
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        minimum: 1
                      from:
                        type:
                          - integer
                          - 'null'
                        minimum: 1
                      last_page:
                        type: integer
                        minimum: 1
                      links:
                        type: array
                        description: Generated paginator links.
                        items:
                          type: object
                          properties:
                            url:
                              type:
                                - string
                                - 'null'
                            label:
                              type: string
                            active:
                              type: boolean
                          required:
                            - url
                            - label
                            - active
                      path:
                        type:
                          - string
                          - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                        minimum: 0
                      to:
                        type:
                          - integer
                          - 'null'
                        description: Number of the last item in the slice.
                        minimum: 1
                      total:
                        type: integer
                        description: Total number of items being paginated.
                        minimum: 0
                    required:
                      - current_page
                      - from
                      - last_page
                      - links
                      - path
                      - per_page
                      - to
                      - total
                required:
                  - data
                  - links
                  - meta
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    FormTemplateResource:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        system_name:
          type: string
        description:
          type:
            - string
            - 'null'
        is_active:
          type: boolean
        questions:
          type: array
          items:
            $ref: '#/components/schemas/FormQuestionResource'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        deleted_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - name
        - system_name
        - description
        - is_active
        - created_at
        - updated_at
        - deleted_at
      title: FormTemplateResource
    FormQuestionResource:
      type: object
      properties:
        id:
          type: integer
        order:
          type: integer
        label:
          type: string
        helper_text:
          type:
            - string
            - 'null'
        question_type:
          type: string
        required:
          type: boolean
        options:
          type: array
          items:
            $ref: '#/components/schemas/FormOptionResource'
        visibility_rules:
          type: array
          items:
            $ref: '#/components/schemas/FormVisibilityRuleResource'
      required:
        - id
        - order
        - label
        - helper_text
        - question_type
        - required
      title: FormQuestionResource
    FormOptionResource:
      type: object
      properties:
        id:
          type: integer
        label:
          type: string
        order:
          type: integer
      required:
        - id
        - label
        - order
      title: FormOptionResource
    FormVisibilityRuleResource:
      type: object
      properties:
        id:
          type: integer
        depends_on_question_id:
          type: integer
        operator:
          type: string
        value:
          type: string
        match_type:
          type: string
      required:
        - id
        - depends_on_question_id
        - operator
        - value
        - match_type
      title: FormVisibilityRuleResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````