Skip to content
gist.link ↗

insights

Query Marketing API — POST https://marketing.api.gist.link/graphql

Cross-channel insight aggregation, one bucket per (groupKey, currency). Any authenticated org member.

marketing:query:insights

The calling IAM key must hold this permission (or a wildcard that covers it: marketing:query:* or marketing:*) and the access token must have been minted with audience=marketing. See Permissions.

type Query {
insights(scope: InsightScopeInput!, dateRange: DateRangeInput!, groupBy: InsightGroupBy!): [InsightBucket!]!
}
Argument Type Required Description
scope InsightScopeInput! Yes —
dateRange DateRangeInput! Yes —
groupBy InsightGroupBy! Yes —

[InsightBucket!]! — see the Marketing types reference.

Terminal window
curl https://marketing.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query Insights($scope: InsightScopeInput!, $dateRange: DateRangeInput!, $groupBy: InsightGroupBy!) { insights(scope: $scope, dateRange: $dateRange, groupBy: $groupBy) { groupKey currency spend impressions clicks conversions } }",
"variables": {
"scope": {
"entityType": "CAMPAIGN"
},
"dateRange": {
"startDate": "example",
"endDate": "example"
},
"groupBy": "PLATFORM"
}
}
JSON