Skip to main content
POST
/
db-mgmt
/
api
/
query-channel-details
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
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt

Use this file to discover all available pages before exploring further.

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:
["campaign"]
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