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

# Change the Salesforce config

> Changes the top-level settings in `changes`, each to its whole new value; every other key stays. Empty `changes` changes nothing. A key that is neither a setting nor saved already is a 422. The save runs the app's checks (a refusal is a 422 with their text), and with `validate_with_api` also checks the filters and fields against Salesforce (a 502 when Salesforce does not answer that check). Saving an Other account filter schedules its monthly run when none is set. A change that streams one more object through CDC (`cdc_enabled`, `cdc_objects`) needs it selected in the org first (POST /cdc/objects): else a 409 that names it, or a 409 without the native connection or the permission to read the org's CDC settings. Try a filter first with /preview. A 409 means the config changed since you read it (or `expected_version` is not the live one): read it again.



## OpenAPI

````yaml /api/statisfy-api.openapi.json patch /v1/integrations/salesforce/config
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/integrations/salesforce/config:
    patch:
      tags:
        - integrations
      summary: Change the Salesforce config
      description: >-
        Changes the top-level settings in `changes`, each to its whole new
        value; every other key stays. Empty `changes` changes nothing. A key
        that is neither a setting nor saved already is a 422. The save runs the
        app's checks (a refusal is a 422 with their text), and with
        `validate_with_api` also checks the filters and fields against
        Salesforce (a 502 when Salesforce does not answer that check). Saving an
        Other account filter schedules its monthly run when none is set. A
        change that streams one more object through CDC (`cdc_enabled`,
        `cdc_objects`) needs it selected in the org first (POST /cdc/objects):
        else a 409 that names it, or a 409 without the native connection or the
        permission to read the org's CDC settings. Try a filter first with
        /preview. A 409 means the config changed since you read it (or
        `expected_version` is not the live one): read it again.
      operationId: integrations_salesforce_update_config
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                changes:
                  additionalProperties: true
                  description: >-
                    The top-level settings to change, each with its whole new
                    value (see GET /config for the keys). A key you leave out
                    stays as it is; null removes a key. Empty: nothing changes
                  title: Changes
                  type: object
                expected_version:
                  anyOf:
                    - description: >-
                        The config `version` you read. Sent: a change against a
                        version that is no longer live is a 409 and writes
                        nothing (0 = the config was never saved). Left out, the
                        version this call reads is used, so a change saved
                        between that read and this write is still a 409: read
                        again and retry
                      minimum: 0
                      type: integer
                    - type: 'null'
                  default: null
                  title: Expected Version
                validate_with_api:
                  default: false
                  description: >-
                    Also check each filter and field against the tenant's CRM
                    before saving
                  title: Validate With Api
                  type: boolean
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesforceConfig'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    SalesforceConfig:
      properties:
        configuration:
          additionalProperties: true
          description: >-
            The settings, by top-level key, as the app's settings page saves
            them
          title: Configuration
          type: object
        source:
          description: >-
            database: saved in Statisfy. code: never saved, Statisfy's built-in
            config runs. none: no config
          enum:
            - database
            - code
            - none
          title: Source
          type: string
        version:
          description: >-
            The config's version: send it as `expected_version` with a change (0
            = never saved)
          title: Version
          type: integer
      required:
        - version
        - source
        - configuration
      title: SalesforceConfig
      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.