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

# Set one custom field on every account a filter selects

> Starts the app's bulk update over 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 answers 202 with the job; poll GET .../bulk-updates/{job_id}. Only a person's key whose role may run a filter-wide bulk update in the app; any other key is a 403. One account bulk update runs at a time per workspace: a second is a 409 naming the running job. No match is a 422. More matches than the configured ceiling (the preview's `hard_ceiling`, 10,000 by default) is a 422. Send an `Idempotency-Key` header to make a retry safe.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/objects/account/records/bulk-updates
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:
    post:
      tags:
        - accounts
      summary: Set one custom field on every account a filter selects
      description: >-
        Starts the app's bulk update over 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 answers 202
        with the job; poll GET .../bulk-updates/{job_id}. Only a person's key
        whose role may run a filter-wide bulk update in the app; any other key
        is a 403. One account bulk update runs at a time per workspace: a second
        is a 409 naming the running job. No match is a 422. More matches than
        the configured ceiling (the preview's `hard_ceiling`, 10,000 by default)
        is a 422. Send an `Idempotency-Key` header to make a retry safe.
      operationId: accounts_bulk_update_start
      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:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateJob'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    AccountListType:
      enum:
        - my_book
        - team_book
        - all_customers
        - unset
        - other
        - churned
      title: AccountListType
      type: string
    BulkUpdateJob:
      properties:
        already_set:
          description: Accounts that already held the value
          title: Already Set
          type: integer
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: Why a REJECTED or FAILED run stopped
          title: Error
        failed:
          title: Failed
          type: integer
        field:
          description: The custom field key the run sets
          title: Field
          type: string
        finished_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Finished At
        has_more:
          default: false
          title: Has More
          type: boolean
        id:
          title: Id
          type: integer
        kept_newer:
          description: >-
            Accounts changed by someone else after the run started, left as they
            were
          title: Kept Newer
          type: integer
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        processed:
          title: Processed
          type: integer
        results:
          anyOf:
            - items:
                $ref: '#/components/schemas/BulkUpdateRecordResult'
              type: array
            - type: 'null'
          description: >-
            Once PROCESSED: each frozen account in order, with its outcome; a
            page of them
          title: Results
        started_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Started At
        state:
          description: >-
            PROCESSED, REJECTED (refused when it ran, e.g. the value no longer
            fits) and FAILED are final
          enum:
            - NEW
            - SNAPSHOTTING
            - IN_PROGRESS
            - PROCESSED
            - REJECTED
            - FAILED
          title: State
          type: string
        total_targeted:
          anyOf:
            - type: integer
            - type: 'null'
          description: The accounts the run froze; null before it starts
          title: Total Targeted
        updated:
          title: Updated
          type: integer
      required:
        - id
        - field
        - state
        - total_targeted
        - processed
        - updated
        - already_set
        - kept_newer
        - failed
        - started_at
        - finished_at
        - error
      title: BulkUpdateJob
      type: object
    BulkUpdateRecordResult:
      properties:
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: Why the record was not updated, when it says
          title: Error
        id:
          title: Id
          type: string
        outcome:
          enum:
            - updated
            - already_set
            - kept_newer
            - failed
          title: Outcome
          type: string
      required:
        - id
        - outcome
      title: BulkUpdateRecordResult
      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.