> ## 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.

# Count the accounts a bulk update would set

> Counts the accounts the app's bulk update matches for the key's person (GET /objects/account/records's `filter` and `view_id`, within `list_type` and `customer_types`) and checks the value as a PATCH would, writing nothing. Only a person's key whose role may run a filter-wide bulk update in the app; any other key is a 403. More matches than the configured ceiling (the preview's `hard_ceiling`, 10,000 by default) is a 422.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/objects/account/records/bulk-updates/preview
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/bulk-updates/preview:
    post:
      tags:
        - accounts
      summary: Count the accounts a bulk update would set
      description: >-
        Counts the accounts the app's bulk update matches for the key's person
        (GET /objects/account/records's `filter` and `view_id`, within
        `list_type` and `customer_types`) and checks the value as a PATCH would,
        writing nothing. Only a person's key whose role may run a filter-wide
        bulk update in the app; any other key is a 403. More matches than the
        configured ceiling (the preview's `hard_ceiling`, 10,000 by default) is
        a 422.
      operationId: accounts_bulk_update_preview
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                customer_types:
                  description: >-
                    The account types tab, as the app sends it. Empty: the
                    workspace's configured types
                  examples:
                    - - Customer
                  items:
                    type: string
                  maxItems: 50
                  title: Customer Types
                  type: array
                fields:
                  additionalProperties: true
                  description: >-
                    Exactly one custom field key and the value to set, as a
                    PATCH takes it; null clears it
                  examples:
                    - tier__c_: gold
                  maxProperties: 1
                  minProperties: 1
                  title: Fields
                  type: object
                filter:
                  additionalProperties:
                    additionalProperties: true
                    type: object
                  description: >-
                    The list's `filter[<key>][<op>]=<value>` as an object, all
                    ANDed. Empty adds no condition: the accounts of `list_type`
                    (and of `view_id`, when sent)
                  examples:
                    - renewal_date:
                        lte: '2027-03-31'
                  title: Filter
                  type: object
                list_type:
                  $ref: '#/components/schemas/AccountListType'
                  description: >-
                    Which accounts, as the app's Accounts page picks them;
                    `all_customers` is a 403 for a role that sees only its book.
                    A role that sees only its book updates only the accounts on
                    its book, as its PATCH does, on every tab
                  examples:
                    - my_book
                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
              required:
                - list_type
                - fields
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdatePreview'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    AccountListType:
      enum:
        - my_book
        - team_book
        - all_customers
        - unset
        - other
        - churned
      title: AccountListType
      type: string
    BulkUpdatePreview:
      properties:
        hard_ceiling:
          description: The most accounts one bulk update takes
          title: Hard Ceiling
          type: integer
        matched_count:
          description: The accounts a start would run over now
          title: Matched Count
          type: integer
      required:
        - matched_count
        - hard_ceiling
      title: BulkUpdatePreview
      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.