> ## 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 users with AND/OR filters

> Like listing, with the filter as a JSON tree: a condition `{"field", "op", "value"}` or a group `{"and": [...]}` / `{"or": [...]}`. Filter on department, email, id, manager, name, role, title, user_id: custom user fields cannot be filtered on. Text `eq`, `contains` and `starts_with` ignore case; `id`, `user_id` and `manager` match exactly. `user_id` `exists` lists the users with a login. A user is a teammate: someone with a Statisfy login, or a CRM user your CRM sync brought in. Contacts, vendors and digital workers are never users. `id` is what owner fields and a task's `creator` hold. Custom fields under `fields` are the user fields, keyed as GET /v1/fields?object=user lists them. Their access role, membership and product licenses are not part of the record.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/objects/user/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/user/records/search:
    post:
      tags:
        - users
      summary: Search users with AND/OR filters
      description: >-
        Like listing, with the filter as a JSON tree: a condition `{"field",
        "op", "value"}` or a group `{"and": [...]}` / `{"or": [...]}`. Filter on
        department, email, id, manager, name, role, title, user_id: custom user
        fields cannot be filtered on. Text `eq`, `contains` and `starts_with`
        ignore case; `id`, `user_id` and `manager` match exactly. `user_id`
        `exists` lists the users with a login. A user is a teammate: someone
        with a Statisfy login, or a CRM user your CRM sync brought in. Contacts,
        vendors and digital workers are never users. `id` is what owner fields
        and a task's `creator` hold. Custom fields under `fields` are the user
        fields, keyed as GET /v1/fields?object=user lists them. Their access
        role, membership and product licenses are not part of the record.
      operationId: users_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
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPage'
          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
    UserPage:
      properties:
        data:
          items:
            $ref: '#/components/schemas/User'
          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: UserPage
      type: object
    User:
      properties:
        calendar_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Calendar Link
        department:
          anyOf:
            - type: string
            - type: 'null'
          title: Department
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        fields:
          additionalProperties: true
          title: Fields
          type: object
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        id:
          description: >-
            The user's id: the people id that owner fields and a task's creator
            hold
          title: Id
          type: string
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
        manager:
          anyOf:
            - type: string
            - type: 'null'
          description: The id of their manager, a user; null when none
          title: Manager
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Their Statisfy login's id; null for a CRM-only user
          title: User Id
      required:
        - id
      title: User
      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.