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

# Get the Pendo config

> The Pendo settings. Read this first when you set Pendo up. `account_id_field` is the Pendo field that holds the CRM account ID: queries read it with {PENDO_ACCOUNT_ID_FIELD}. `surveys` is the NPS survey job's settings. `week_start_day` is the day product usage weeks start on. The queries are /integrations/pendo/queries. `version` is 0 when nothing was saved. The setup order: (1) an admin connects the Pendo key in Statisfy's app, never through the API; (2) test the connection: POST /v1/integrations/pendo/connection/test (integrations:read); (3) find the CRM ID field: GET /v1/integrations/pendo/account-fields (integrations:read): a high `filled` count marks a likely field, so check its values with POST /v1/integrations/pendo/preview first; (4) save it: PATCH /v1/integrations/pendo/config (integrations:write); (5) browse GET /v1/integrations/pendo/reports and GET /v1/integrations/pendo/catalog/{kind} (integrations:read); (6) check a query: POST /v1/integrations/pendo/query/validate (integrations:read), then run a sample: POST /v1/integrations/pendo/preview (integrations:write); (7) save it: POST /v1/integrations/pendo/queries (integrations:write); (8) for NPS surveys: GET /v1/integrations/pendo/surveys (integrations:read), try the settings with POST /v1/integrations/pendo/surveys/preview (integrations:write), and save them with PATCH /v1/integrations/pendo/config and `surveys` (integrations:write); (9) set the schedule: PUT /v1/integrations/pendo/schedule (integrations:write). This step is required: Pendo has no default cadence, so a subtype with no schedule entry never runs. The app turns on the daily `surveys` schedule when an admin first saves the survey settings; the API does not, so send it; (10) start a run: POST /v1/integrations/pendo/runs, or POST /v1/integrations/pendo/surveys/runs for the NPS survey job (integrations:write), and read it: GET /v1/integrations/pendo/runs/{run_id} (integrations:read).



## OpenAPI

````yaml /api/statisfy-api.openapi.json get /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:
    get:
      tags:
        - integrations
      summary: Get the Pendo config
      description: >-
        The Pendo settings. Read this first when you set Pendo up.
        `account_id_field` is the Pendo field that holds the CRM account ID:
        queries read it with {PENDO_ACCOUNT_ID_FIELD}. `surveys` is the NPS
        survey job's settings. `week_start_day` is the day product usage weeks
        start on. The queries are /integrations/pendo/queries. `version` is 0
        when nothing was saved. The setup order: (1) an admin connects the Pendo
        key in Statisfy's app, never through the API; (2) test the connection:
        POST /v1/integrations/pendo/connection/test (integrations:read); (3)
        find the CRM ID field: GET /v1/integrations/pendo/account-fields
        (integrations:read): a high `filled` count marks a likely field, so
        check its values with POST /v1/integrations/pendo/preview first; (4)
        save it: PATCH /v1/integrations/pendo/config (integrations:write); (5)
        browse GET /v1/integrations/pendo/reports and GET
        /v1/integrations/pendo/catalog/{kind} (integrations:read); (6) check a
        query: POST /v1/integrations/pendo/query/validate (integrations:read),
        then run a sample: POST /v1/integrations/pendo/preview
        (integrations:write); (7) save it: POST /v1/integrations/pendo/queries
        (integrations:write); (8) for NPS surveys: GET
        /v1/integrations/pendo/surveys (integrations:read), try the settings
        with POST /v1/integrations/pendo/surveys/preview (integrations:write),
        and save them with PATCH /v1/integrations/pendo/config and `surveys`
        (integrations:write); (9) set the schedule: PUT
        /v1/integrations/pendo/schedule (integrations:write). This step is
        required: Pendo has no default cadence, so a subtype with no schedule
        entry never runs. The app turns on the daily `surveys` schedule when an
        admin first saves the survey settings; the API does not, so send it;
        (10) start a run: POST /v1/integrations/pendo/runs, or POST
        /v1/integrations/pendo/surveys/runs for the NPS survey job
        (integrations:write), and read it: GET
        /v1/integrations/pendo/runs/{run_id} (integrations:read).
      operationId: integrations_pendo_get_config
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendoConfig'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    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.