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

# Advanced record query

> Powerful filtered, sorted, paginated record query used by AI and workflow automation. Supports filtering, sorting, field selection, and cross-source queries.




## OpenAPI

````yaml /openapi/crm.yaml post /records/query
openapi: 3.1.0
info:
  title: Connie CRM API
  version: 1.0.0
  description: >
    API for contacts, companies, records, tasks, reminders, notes, activity
    feeds, and data enrichment. All endpoints require authentication.
servers:
  - url: https://connie.ai/api
    description: Production
security:
  - cookieAuth: []
tags:
  - name: Contacts
    description: Contact management and lookup
  - name: Contact Notes
    description: Notes on contacts
  - name: Contact Tasks
    description: Tasks linked to contacts
  - name: Contact Reminders
    description: Reminders linked to contacts
  - name: Companies
    description: Company management
  - name: Company Notes
    description: Notes on companies
  - name: Company Tasks
    description: Tasks linked to companies
  - name: CRM Utilities
    description: CRM setup, enrichment triggers, and table IDs
  - name: Records
    description: Generic record management across CRM sources
  - name: Enrichment
    description: Data enrichment tools and jobs
  - name: Reminders
    description: Standalone and entity-linked reminders
  - name: Tasks
    description: Task comments and activity feeds
paths:
  /records/query:
    post:
      tags:
        - Records
      summary: Advanced record query
      description: >
        Powerful filtered, sorted, paginated record query used by AI and
        workflow automation. Supports filtering, sorting, field selection, and
        cross-source queries.
      operationId: queryRecords
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - workspace_id
              properties:
                workspace_id:
                  type: string
                  format: uuid
                sources:
                  type: array
                  items:
                    type: string
                filters:
                  type: array
                  items:
                    type: object
                    required:
                      - property
                      - operator
                      - value
                    properties:
                      property:
                        type: string
                      operator:
                        type: string
                        enum:
                          - eq
                          - neq
                          - contains
                          - not_contains
                          - starts_with
                          - ends_with
                          - gt
                          - gte
                          - lt
                          - lte
                          - is_empty
                          - is_not_empty
                          - in
                          - not_in
                      value: {}
                sorts:
                  type: array
                  items:
                    type: object
                    required:
                      - property
                      - direction
                    properties:
                      property:
                        type: string
                      direction:
                        type: string
                        enum:
                          - asc
                          - desc
                search:
                  type: string
                limit:
                  type: integer
                  minimum: 1
                  maximum: 1000
                  default: 50
                offset:
                  type: integer
                  minimum: 0
                  default: 0
                include_archived:
                  type: boolean
                  default: false
                select:
                  type: array
                  items:
                    type: string
                  description: Specific fields to return
      responses:
        '200':
          description: Query results
components:
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: session

````

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