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

# Search accounts with AND/OR filters

> Like listing, with the filter as a JSON tree: a condition `{"field", "op", "value"}` or a group `{"and": [...]}` / `{"or": [...]}`, at most 3 levels deep and 20 conditions. Standard fields sit at the top level and custom fields under `fields`, keyed as GET /v1/fields?object=account lists them. Owner fields and `parent` hold the id of one record; `owners` lists every owner, including owners synced from a CRM, with the owner field it holds (null for a synced owner). `health` (overall) and each `<pillar>_health` are the pillar's current label, and `health_summary` the overall reason, as the app's health widget shows them; each pillar's reason, confidence, source and history are GET /v1/health (scope health:read). Renewals are not returned yet. Deleted accounts are never returned.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/objects/account/records/search
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/objects/account/records/search:
    post:
      tags:
        - accounts
      summary: Search accounts with AND/OR filters
      description: >-
        Like listing, with the filter as a JSON tree: a condition `{"field",
        "op", "value"}` or a group `{"and": [...]}` / `{"or": [...]}`, at most 3
        levels deep and 20 conditions. Standard fields sit at the top level and
        custom fields under `fields`, keyed as GET /v1/fields?object=account
        lists them. Owner fields and `parent` hold the id of one record;
        `owners` lists every owner, including owners synced from a CRM, with the
        owner field it holds (null for a synced owner). `health` (overall) and
        each `<pillar>_health` are the pillar's current label, and
        `health_summary` the overall reason, as the app's health widget shows
        them; each pillar's reason, confidence, source and history are GET
        /v1/health (scope health:read). Renewals are not returned yet. Deleted
        accounts are never returned.
      operationId: accounts_search
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                cursor:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  description: '`next_cursor` from the previous page'
                  title: Cursor
                fields:
                  anyOf:
                    - items:
                        type: string
                      type: array
                    - type: 'null'
                  default: null
                  description: >-
                    Custom field keys to return (comma-separated); all of them
                    when omitted
                  title: Fields
                filter:
                  anyOf:
                    - $ref: '#/components/schemas/FilterCondition'
                    - $ref: '#/components/schemas/FilterGroup'
                    - type: 'null'
                  default: null
                  description: A condition, or an 'and'/'or' group of them
                  title: Filter
                limit:
                  default: 25
                  maximum: 100
                  minimum: 1
                  title: Limit
                  type: integer
                view_id:
                  anyOf:
                    - minimum: 1
                      type: integer
                    - type: 'null'
                  default: null
                  description: >-
                    Only the records this saved view or segment selects (GET
                    /v1/views lists them); other filters narrow them further
                  title: View Id
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountPage'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    FilterCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        op:
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - in
            - nin
            - contains
            - not_contains
            - starts_with
            - ends_with
            - exists
            - not_exists
          title: Op
          type: string
        value:
          default: null
          title: Value
      required:
        - field
        - op
      title: FilterCondition
      type: object
    FilterGroup:
      additionalProperties: false
      properties:
        and:
          anyOf:
            - items:
                anyOf:
                  - $ref: '#/components/schemas/FilterCondition'
                  - $ref: '#/components/schemas/FilterGroup'
              type: array
            - type: 'null'
          default: null
          title: And
        or:
          anyOf:
            - items:
                anyOf:
                  - $ref: '#/components/schemas/FilterCondition'
                  - $ref: '#/components/schemas/FilterGroup'
              type: array
            - type: 'null'
          default: null
          title: Or
      title: FilterGroup
      type: object
    AccountPage:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Account'
          title: Data
          type: array
        has_more:
          default: false
          title: Has More
          type: boolean
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      required:
        - data
      title: AccountPage
      type: object
    Account:
      properties:
        account_summary__s_:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Summary  S
        arr:
          anyOf:
            - type: integer
            - type: 'null'
          title: Arr
        crm_account_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Crm Account Id
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain
        experience_health:
          anyOf:
            - type: string
            - type: 'null'
          title: Experience Health
        feature_requests_health:
          anyOf:
            - type: string
            - type: 'null'
          title: Feature Requests Health
        fields:
          additionalProperties: true
          title: Fields
          type: object
        health:
          anyOf:
            - type: string
            - type: 'null'
          title: Health
        health_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Health Summary
        hierarchy:
          anyOf:
            - type: string
            - type: 'null'
          title: Hierarchy
        id:
          title: Id
          type: string
        last_activity_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Activity Date
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        outcomes_health:
          anyOf:
            - type: string
            - type: 'null'
          title: Outcomes Health
        owner_names:
          items:
            type: string
          title: Owner Names
          type: array
        owners:
          items:
            $ref: '#/components/schemas/AccountOwner'
          title: Owners
          type: array
        parent:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent
        product_usage_health:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Usage Health
        relationship_health:
          anyOf:
            - type: string
            - type: 'null'
          title: Relationship Health
        renewal_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Renewal Date
        risks_health:
          anyOf:
            - type: string
            - type: 'null'
          title: Risks Health
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
      required:
        - id
      title: Account
      type: object
    AccountOwner:
      properties:
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        user_id:
          title: User Id
          type: string
      required:
        - user_id
      title: AccountOwner
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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