curl --request POST \
--url https://api.upstackdata.com/db-mgmt/api/query-channel-details \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-pixel-id: <api-key>' \
--data '
{
"pixelId": "5f1e6a4f-...",
"granularity": "day"
}
'{
"results": [
{
"basicDetails": {},
"data": {
"primary": [
{
"dt": "<string>",
"start": "<string>",
"end": "<string>"
}
],
"compare": [
{
"dt": "<string>",
"start": "<string>",
"end": "<string>"
}
]
}
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123,
"hasMore": true
}
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}List channel entities with optional metrics
List ad accounts, campaigns, ad sets, or ads from the ads-platform integrations connected to your pixel, with optional metric aggregation over a date range.
Required scope: analytics:read.
curl --request POST \
--url https://api.upstackdata.com/db-mgmt/api/query-channel-details \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-pixel-id: <api-key>' \
--data '
{
"pixelId": "5f1e6a4f-...",
"granularity": "day"
}
'{
"results": [
{
"basicDetails": {},
"data": {
"primary": [
{
"dt": "<string>",
"start": "<string>",
"end": "<string>"
}
],
"compare": [
{
"dt": "<string>",
"start": "<string>",
"end": "<string>"
}
]
}
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123,
"hasMore": true
}
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}Authorizations
Your Upstack API key. Starts with upstack_.
The pixel id the request targets.
Body
Must match the x-pixel-id header (403 if it doesn't).
none, second, minute, hour, day, week, month, quarter, year At most one grain dimension: campaign, adset, or ad.
Omit for account grain (default).
5campaign, adset, ad ["campaign"]
Optional. When set, aggregates the named measures over dateRange.
30Show child attributes
Show child attributes
Required together with measures. Absent = entity-only listing.
Show child attributes
Show child attributes
Optional comparison period. Forbidden when measures is absent.
Show child attributes
Show child attributes
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).
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
IANA timezone.
ISO 4217 code to convert money measures to (e.g. EUR). Each
amount converts at the rate for the day it occurred.
Defaults to USD when omitted — if your store sells in
another currency, pass this explicitly.
Applies to results[].measures only: the basicDetails
budget fields (dailyBudget, budgetRemaining,
amountSpent) are point-in-time values from the ad platform
and stay in their native currency, which each row reports in
its own currency field.
1 <= x <= 500x >= 0sourceUpdatedAt, sourceCreatedAt, resourceName asc, desc Was this page helpful?