Skip to main content
PATCH
Change a saved Pendo query

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.

Path Parameters

query_id
string
required

The saved query's id, from /queries

Required string length: 1 - 64

Body

application/json

Only what you send changes; null clears a field.

account_resolver
AccountResolverConfig · object | null

How a row finds its account. Required, except for a people query that creates no people

custom_field_mappings
CustomFieldMappingConfig · object[] | null

custom_field queries: column -> field. Each field must already exist (/v1/fields)

custom_object_config
CustomObjectConfig · object | null

custom_object queries

entity_type
enum<string> | null
Available options:
account,
people
expected_version
integer | null

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

Required range: x >= 0
is_active
boolean | null
name
string | null
Required string length: 1 - 200
period
enum<string> | null

The window each run covers; null follows the schedule (weekly by default). product_usage takes DAILY, WEEKLY or MONTHLY only

Available options:
HOURLY,
TWO_HOURS,
FOUR_HOURS,
SIX_HOURS,
TWELVE_HOURS,
DAILY,
WEEKLY,
MONTHLY
person_resolver
PersonResolverConfig · object | null

people queries: how a row finds its person. The internal domains default to the workspace's own

product_usage_mappings
ProductUsageMappingConfig · object[] | null

product_usage queries: column -> metric. Each metric must already exist (/v1/products)

query
string | null

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

Required string length: 1 - 100000
query_type
enum<string> | null

What the query writes

Available options:
custom_field,
product_usage,
custom_object
transformers
ColumnTransformerConfig · object[] | null

Per-column value pipelines, applied after the account lookup and before writing

Response

200 - application/json

Successful Response

A saved Pendo query as stored. Its resolver, mapping and transformer objects have the same shapes as in a SQL warehouse query.

account_resolver
Account Resolver · object | null
required

How a row finds its account

custom_field_mappings
Custom Field Mappings · object[] | null
required

custom_field queries: column to field

custom_object_config
Custom Object Config · object | null
required

custom_object queries

entity_type
enum<string>
required

custom_field only: account fields or people fields

Available options:
account,
people
id
string | null
required

Stable id. null only on a query saved before ids existed: any save of the config gives it one

is_active
boolean
required

An inactive query is kept but not run

name
string
required
period
enum<string> | null
required

The window each run covers. null follows the schedule (weekly by default)

Available options:
HOURLY,
TWO_HOURS,
FOUR_HOURS,
SIX_HOURS,
TWELVE_HOURS,
DAILY,
WEEKLY,
MONTHLY
person_resolver
Person Resolver · object | null
required

people queries: how a row finds its person

product_usage_mappings
Product Usage Mappings · object[] | null
required

product_usage queries: column to metric

query
string
required

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

query_type
enum<string>
required

custom_field writes field values; product_usage writes usage metrics; custom_object writes records

Available options:
custom_field,
product_usage,
custom_object
transformers
Transformers · object[] | null
required

Per-column value pipelines

version
integer
required

The config's version: send it as expected_version with a change