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

# Query data

> Ask questions about your data.
Use the `chats` endpoint to start a conversation with follow-up questions.



## OpenAPI

````yaml https://vectorify.ai/api.json post /query
openapi: 3.1.0
info:
  title: Vectorify
  version: 1.0.0
servers:
  - url: https://api.vectorify.ai/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Query
  - name: Chats
  - name: Upserts
  - name: Items
  - name: Collections
paths:
  /query:
    post:
      tags:
        - Query
      summary: Query data
      description: >-
        Ask questions about your data.

        Use the `chats` endpoint to start a conversation with follow-up
        questions.
      operationId: query.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/App.Http.Requests.Api.Chat'
      responses:
        '201':
          description: '`ChatMessage`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ChatMessage'
                required:
                  - data
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    App.Http.Requests.Api.Chat:
      type: object
      properties:
        text:
          type: string
          example: how many invoices are in draft status?
        collections:
          type:
            - array
            - 'null'
          description: Array of collection slugs to filter the query.
          example:
            - invoices
          items:
            type: string
        tenant:
          type:
            - integer
            - 'null'
          description: Required if the project is multi-tenant.
          example: 235611
        identifier:
          type: object
          description: Optional user identifier data.
          example:
            id: '123'
            name: John Doe
            email: john@example.com
          properties:
            id:
              type: integer
            name:
              type: string
              maxLength: 100
            email:
              type: string
              format: email
              maxLength: 100
      required:
        - text
      title: App.Http.Requests.Api.Chat
    ChatMessage:
      type: object
      properties:
        id:
          type: string
        chat_id:
          type: string
        role:
          type: string
        user:
          $ref: '#/components/schemas/User'
        text:
          type: string
        text_html:
          type: string
        identifier:
          type:
            - string
            - 'null'
        feedback:
          type:
            - string
            - 'null'
        created_at:
          type: string
      required:
        - id
        - chat_id
        - role
        - text
        - text_html
        - identifier
        - feedback
        - created_at
      title: ChatMessage
    User:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
        avatar:
          type: string
        created_at:
          type: string
      required:
        - id
        - name
        - email
        - avatar
        - created_at
      title: User
  responses:
    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:
    apiKey:
      type: apiKey
      in: header
      name: Api-Key

````