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

# Preview a Pendo query

> Runs a draft (`query` with `query_type`) against Pendo and returns up to `limit` rows (at most 100). To try a saved query, read it with GET /integrations/pendo/queries/{query_id} and send its `query` and `query_type`. The date tokens take the latest complete `period` (weekly when left out). Nothing is written. Use it to check the shape of the rows. A 409 means Pendo is not connected, or Pendo rejected the key: an admin fixes the connection in Statisfy's app. A 422 means Pendo refused the call (a wrong region comes with its own message). A 404 means Pendo did not find the requested item. A 502 means Pendo did not answer or is rate limited: try again in a minute. Needs integrations:write: the rows can be any Pendo data, emails included.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/integrations/pendo/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/integrations/pendo/preview:
    post:
      tags:
        - integrations
      summary: Preview a Pendo query
      description: >-
        Runs a draft (`query` with `query_type`) against Pendo and returns up to
        `limit` rows (at most 100). To try a saved query, read it with GET
        /integrations/pendo/queries/{query_id} and send its `query` and
        `query_type`. The date tokens take the latest complete `period` (weekly
        when left out). Nothing is written. Use it to check the shape of the
        rows. A 409 means Pendo is not connected, or Pendo rejected the key: an
        admin fixes the connection in Statisfy's app. A 422 means Pendo refused
        the call (a wrong region comes with its own message). A 404 means Pendo
        did not find the requested item. A 502 means Pendo did not answer or is
        rate limited: try again in a minute. Needs integrations:write: the rows
        can be any Pendo data, emails included.
      operationId: integrations_pendo_preview_query
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                limit:
                  default: 10
                  description: The most rows to return
                  maximum: 100
                  minimum: 1
                  title: Limit
                  type: integer
                period:
                  anyOf:
                    - enum:
                        - HOURLY
                        - TWO_HOURS
                        - FOUR_HOURS
                        - SIX_HOURS
                        - TWELVE_HOURS
                        - DAILY
                        - WEEKLY
                        - MONTHLY
                      type: string
                    - type: 'null'
                  default: null
                  description: >-
                    Fills the date tokens with the latest complete period.
                    Weekly when left out
                  title: Period
                query:
                  description: >-
                    The Pendo aggregation JSON, as text. A request body with a
                    `request.pipeline`. It may use {START_DATE_MS},
                    {END_DATE_MS} and {PENDO_ACCOUNT_ID_FIELD}, which each run
                    fills in
                  maxLength: 100000
                  minLength: 1
                  title: Query
                  type: string
                query_type:
                  description: >-
                    Decides how the date tokens are filled: a custom_object
                    query has no dates
                  enum:
                    - custom_field
                    - product_usage
                    - custom_object
                  title: Query Type
                  type: string
                week_start_day:
                  anyOf:
                    - maximum: 6
                      minimum: 0
                      type: integer
                    - type: 'null'
                  default: null
                  description: >-
                    0 = Monday … 6 = Sunday. The config's week start day when
                    left out
                  title: Week Start Day
              required:
                - query
                - query_type
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendoPreviewRows'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    PendoPreviewRows:
      properties:
        columns:
          description: The column names of the first row
          items:
            type: string
          title: Columns
          type: array
        row_count:
          description: How many rows are returned
          title: Row Count
          type: integer
        rows:
          description: The rows, flattened. They can hold any Pendo data, emails included
          items:
            additionalProperties: true
            type: object
          title: Rows
          type: array
        truncated:
          description: True when Pendo had more rows than `limit`
          title: Truncated
          type: boolean
      required:
        - columns
        - rows
        - row_count
        - truncated
      title: PendoPreviewRows
      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.