> ## 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 Pendo config

> Changes the settings you send; the rest, and every query, stay. `account_id_field` is the Pendo field that holds the CRM account ID (find it with GET /v1/integrations/pendo/account-fields); null clears it, which is refused while a saved query uses {PENDO_ACCOUNT_ID_FIELD}. `week_start_day` is the day product usage weeks start on. `surveys` are the NPS survey settings: send only the ones to change, the others keep their saved values, and a first save starts from the defaults (`surveys: null` is a 422). The save then does what the app's survey setup does. A field that is not chosen becomes the account_id_field of the config. With create_missing_people false, the field is saved as an empty text, because every answer is from a known person. `account_match` is saved only with a field, and defaults to crm_account_id. This call does not set a schedule: PUT /v1/integrations/pendo/schedule does, and the survey job needs it. A save runs the app's Pendo checks first, and a refusal is a 422 with the app's text: a query that is not valid Pendo aggregation JSON, a query that uses {PENDO_ACCOUNT_ID_FIELD} while no account ID field is set, group_by_columns, order_by_columns or limit (they do not apply to Pendo), a survey ID with a character other than a letter, digit, - or _, a custom field match that is not a text custom field of accounts. A 409 means the config changed since you read it (or `expected_version` is not the live one): read it again. Returns the config, as GET /v1/integrations/pendo/config does.



## OpenAPI

````yaml /api/statisfy-api.openapi.json patch /v1/integrations/pendo/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/pendo/config:
    patch:
      tags:
        - integrations
      summary: Change the Pendo config
      description: >-
        Changes the settings you send; the rest, and every query, stay.
        `account_id_field` is the Pendo field that holds the CRM account ID
        (find it with GET /v1/integrations/pendo/account-fields); null clears
        it, which is refused while a saved query uses {PENDO_ACCOUNT_ID_FIELD}.
        `week_start_day` is the day product usage weeks start on. `surveys` are
        the NPS survey settings: send only the ones to change, the others keep
        their saved values, and a first save starts from the defaults (`surveys:
        null` is a 422). The save then does what the app's survey setup does. A
        field that is not chosen becomes the account_id_field of the config.
        With create_missing_people false, the field is saved as an empty text,
        because every answer is from a known person. `account_match` is saved
        only with a field, and defaults to crm_account_id. This call does not
        set a schedule: PUT /v1/integrations/pendo/schedule does, and the survey
        job needs it. A save runs the app's Pendo checks first, and a refusal is
        a 422 with the app's text: a query that is not valid Pendo aggregation
        JSON, a query that uses {PENDO_ACCOUNT_ID_FIELD} while no account ID
        field is set, group_by_columns, order_by_columns or limit (they do not
        apply to Pendo), a survey ID with a character other than a letter,
        digit, - or _, a custom field match that is not a text custom field of
        accounts. A 409 means the config changed since you read it (or
        `expected_version` is not the live one): read it again. Returns the
        config, as GET /v1/integrations/pendo/config does.
      operationId: integrations_pendo_update_config
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              description: Only what you send changes; the rest, and every query, stay.
              properties:
                account_id_field:
                  anyOf:
                    - maxLength: 200
                      type: string
                    - type: 'null'
                  default: null
                  description: >-
                    The Pendo account field that holds the CRM account ID, for
                    example salesforce.accountid. It is a group and a field
                    joined by a dot, such as custom.crm_id, and the group is not
                    metadata. null or an empty text clears it. The save is
                    refused while a saved query uses {PENDO_ACCOUNT_ID_FIELD}
                  title: Account Id Field
                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
                        change always lands
                      minimum: 0
                      type: integer
                    - type: 'null'
                  default: null
                  title: Expected Version
                surveys:
                  anyOf:
                    - $ref: '#/components/schemas/PendoSurveySettings'
                    - type: 'null'
                  default: null
                  description: >-
                    The NPS survey settings to change. Send only the settings
                    you want to change: the others keep their saved values, and
                    a first save starts from the defaults. null is refused
                    (422): the settings cannot be removed. The save then applies
                    the app's survey setup rules, see the description of this
                    call
                week_start_day:
                  anyOf:
                    - maximum: 6
                      minimum: 0
                      type: integer
                    - type: 'null'
                  default: null
                  description: >-
                    The day product usage weeks start on: 0 = Monday … 6 =
                    Sunday
                  title: Week Start Day
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendoConfig'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    PendoSurveySettings:
      additionalProperties: false
      description: The settings of the NPS survey job.
      properties:
        account_id_field:
          anyOf:
            - maxLength: 512
              type: string
            - type: 'null'
          default: null
          description: >-
            The Pendo account field that finds the account of a response, for
            example custom.crm_id. An empty text means no field: the email of
            the person finds the account. null means not chosen: the job uses
            the config's account_id_field
          title: Account Id Field
        account_match:
          anyOf:
            - maxLength: 512
              type: string
            - type: 'null'
          default: null
          description: >-
            The Statisfy account field that the Pendo value is matched to:
            crm_account_id, domain, name, or the key of a text custom field of
            accounts. null means crm_account_id
          title: Account Match
        create_missing_people:
          default: true
          description: >-
            False: a response from a person who is not in Statisfy yet is
            skipped
          title: Create Missing People
          type: boolean
        mode:
          default: all_guides
          description: >-
            all_guides reads every NPS guide. selected reads only
            `selected_guides`. Both modes also read `sentiment_survey_ids`
          enum:
            - all_guides
            - selected
          title: Mode
          type: string
        selected_guides:
          description: >-
            selected mode: the NPS guide IDs to read. Take them from GET
            /v1/integrations/pendo/surveys: only their format is checked here
            (letters, digits, - and _), and a guide that does not exist fails at
            each run
          items:
            maxLength: 200
            minLength: 1
            pattern: ^[A-Za-z0-9_-]+$
            type: string
          maxItems: 50
          title: Selected Guides
          type: array
        sentiment_survey_ids:
          description: >-
            Sentiment survey IDs to read, in both modes. Pendo cannot list them,
            so the admin gives each ID. Check each one with GET
            /v1/integrations/pendo/surveys/sentiment/{survey_id} first: only the
            format is checked here, and a wrong ID fails at each run. An empty
            list reads no Sentiment survey
          items:
            maxLength: 200
            minLength: 1
            pattern: ^[A-Za-z0-9_-]+$
            type: string
          maxItems: 50
          title: Sentiment Survey Ids
          type: array
      title: PendoSurveySettings
      type: object
    PendoConfig:
      description: The Pendo settings. The queries are their own resource (`/queries`).
      properties:
        account_id_field:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The Pendo account field that holds the CRM account ID, for example
            salesforce.accountid. A query reads it with the token
            {PENDO_ACCOUNT_ID_FIELD}. null until an admin sets it. Find it with
            /account-fields: a high `filled` count marks a likely field; check
            its values with /preview before saving it
          title: Account Id Field
        surveys:
          anyOf:
            - $ref: '#/components/schemas/PendoSavedSurveySettings'
            - type: 'null'
          description: >-
            The NPS survey job's settings. null when never saved: the job then
            uses the defaults. With no saved Pendo config at all (`version` 0),
            the job reads nothing
        version:
          description: >-
            The config's version: send it as `expected_version` with a change (0
            = never saved)
          title: Version
          type: integer
        week_start_day:
          description: 'The day product usage weeks start on: 0 = Monday … 6 = Sunday'
          title: Week Start Day
          type: integer
      required:
        - version
        - account_id_field
        - week_start_day
        - surveys
      title: PendoConfig
      type: object
    PendoSavedSurveySettings:
      additionalProperties: false
      description: >-
        The saved survey settings. A class of its own: the published schema of a
        response differs

        from that of a request (every field is present), and one name may not
        hold both.


        It takes what the app saved with no request limits: the app's save
        checks the characters of a

        survey ID, not its length, so a limit here would make every read of such
        a config a 500.
      properties:
        account_id_field:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The Pendo account field that finds the account of a response. An
            empty text means no field
          title: Account Id Field
        account_match:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The Statisfy account field that the Pendo value is matched to. null
            means crm_account_id
          title: Account Match
        create_missing_people:
          default: true
          description: >-
            False: a response from a person who is not in Statisfy yet is
            skipped
          title: Create Missing People
          type: boolean
        mode:
          default: all_guides
          description: >-
            all_guides reads every NPS guide. selected reads only
            `selected_guides`. Both modes also read `sentiment_survey_ids`
          enum:
            - all_guides
            - selected
          title: Mode
          type: string
        selected_guides:
          description: 'selected mode: the NPS guide IDs to read'
          items:
            type: string
          title: Selected Guides
          type: array
        sentiment_survey_ids:
          description: Sentiment survey IDs to read, in both modes
          items:
            type: string
          title: Sentiment Survey Ids
          type: array
      required:
        - selected_guides
        - sentiment_survey_ids
        - account_id_field
        - account_match
      title: PendoSavedSurveySettings
      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.