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

# Query form rows

> Form table rows. Default columns: title, type, tags, question/field count, public flag and created date — every column the form table specifies is in the default set, so `columns` currently adds nothing. Hidden forms are excluded unless `filters.include_hidden` is set.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /library/forms/_query
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /library/forms/_query:
    post:
      tags:
        - library
      summary: Query form rows
      description: >-
        Form table rows. Default columns: title, type, tags, question/field
        count, public flag and created date — every column the form table
        specifies is in the default set, so `columns` currently adds nothing.
        Hidden forms are excluded unless `filters.include_hidden` is set.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pkg_routes_library_forms.QueryFormsRequest'
        description: Query forms request
        required: true
      responses:
        '200':
          description: Form rows
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_routes_library_forms.QueryFormsResponse
        '400':
          description: Bad request - invalid request body
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_library_forms.QueryFormsRequest:
      type: object
      properties:
        columns:
          description: >-
            Columns names the optional cells to add to the default response.
            Every

            column the form table specifies is part of the default set, so this
            is

            accepted for uniformity with the other row routes and currently adds

            nothing.
          type: array
          items:
            type: string
        filters:
          $ref: '#/components/schemas/pkg_routes_library_forms.QueryFormsFilters'
        page:
          $ref: '#/components/schemas/types.ListPagination'
        sort:
          $ref: '#/components/schemas/types.ListSort'
    pkg_routes_library_forms.QueryFormsResponse:
      type: object
      properties:
        rows:
          type: array
          items:
            $ref: '#/components/schemas/pkg_routes_library_forms.FormRow'
        total:
          type: integer
    pkg_routes_library_forms.QueryFormsFilters:
      type: object
      properties:
        created:
          $ref: '#/components/schemas/types.ListFilterDate'
        ids:
          type: array
          items:
            type: string
        include_hidden:
          description: |-
            IncludeHidden keeps hidden forms in the result; they are excluded by
            default, matching /library/forms/_list.
          type: boolean
        public:
          description: >-
            Public narrows to forms reachable without authentication, or away
            from

            them. Omit for both.
          type: boolean
        search:
          type: string
        tags:
          type: array
          items:
            type: string
        type:
          type: array
          items:
            type: string
    types.ListPagination:
      type: object
      properties:
        limit:
          type: integer
        skip:
          type: integer
    types.ListSort:
      type: object
      properties:
        field:
          type: string
        last: {}
        order:
          type: integer
    pkg_routes_library_forms.FormRow:
      type: object
      properties:
        _id:
          type: string
        created_at:
          type: string
        n_questions:
          description: >-
            NumQuestions is how many answers the form collects: its questions
            for a

            questionnaire, or its mapped fields for a PDF, which store the same
            thing

            in different places.
          type: integer
        public:
          type: boolean
        tags:
          type: array
          items:
            type: string
        title:
          type: string
        type:
          description: Type is "questionnaire" or "pdf".
          type: string
    types.ListFilterDate:
      type: object
      properties:
        after:
          type: string
        before:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

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