Skip to main content
POST

Authorizations

x-api-key
string
header
required

Your Upstack API key. Starts with upstack_.

x-pixel-id
string
header
required

The pixel id the request targets.

Body

application/json
pixelId
string
required

Must match the x-pixel-id header (403 if it doesn't).

granularity
enum<string>
required
Available options:
none,
second,
minute,
hour,
day,
week,
month,
quarter,
year
dimensions
enum<string>[]

At most one grain dimension: campaign, adset, or ad. Omit for account grain (default).

Maximum array length: 5
Available options:
campaign,
adset,
ad
Example:
measures
object[]

Optional. When set, aggregates the named measures over dateRange.

Maximum array length: 30
dateRange
object

Required together with measures. Absent = entity-only listing.

compareDateRange
object

Optional comparison period. Forbidden when measures is absent.

filters
object

Canonical filter applied to the listing. Common shapes: scope by channel.resource_source (platform), channel.account_id (ad account), or channel.campaign_id (parent campaign for adset/ad grain).

timezone
string

IANA timezone.

limit
integer
default:50
Required range: 1 <= x <= 500
offset
integer
default:0
Required range: x >= 0
sortBy
enum<string>
default:sourceUpdatedAt
Available options:
sourceUpdatedAt,
sourceCreatedAt,
resourceName
sortDirection
enum<string>
default:desc
Available options:
asc,
desc

Response

Listing results.

results
object[]
required
pagination
object
required