Query message statistics
Changed onSends, engagement and attributed revenue for merchant campaigns and flows, by send cohort: a click or order counts toward the hour its message was sent, bucketed in the property's timezone. Shopper sends (campaigns, Autos, Responses) are excluded from every row and total, so source_type: flow means merchant automations; a property with more than 1,000 Shopper campaigns and automations answers 503 service_unavailable rather than totals that include them. Attribution-dependent statistics come back once per attribution model the property has; data.attribution_models flags the default. Billing figures are not served here. A query is not a mutation and takes no Idempotency-Key. At most 3 dimensions and 500 rows; past 500, data.truncated is true and rows holds the first 500 — narrow with filter rather than paging. filter.message_id requires message in group_by (400 otherwise) and narrows rows only; totals cover the other filter clauses. Only these groupings are served in the property's timezone: none, source_type, interval alone, campaign or flow, and interval: day with campaign/flow and message; every other grouping is served in UTC days and says so in timezone_reason.
Request
- Base URLhttps://api.pscrpt.com/v1
- URLhttps://api.pscrpt.com/v1/message-stats
- Auth
- HTTP bearer
- or OAuth 2Authorization code: https://api.pscrpt.com/oauth/authorizeToken URL: https://api.pscrpt.com/oauth/token scopes: metrics:read
Headers
Overrides the key's pinned API revision for this request.
Request body
Example request
{
"attribution_models": [
"last_touch"
],
"timeframe": {
"gte": "2026-07-23T17:32:01.123456Z",
"lte": "2026-07-23T17:32:01.123456Z"
}
}Response
Statistics per requested dimension combination, plus independent totals.
Example response
{
"data": {
"rows": [
{
"dimensions": {
"bucket_start": "2026-07-23T17:32:01.123456Z"
}
}
],
"timeframe": {
"gte": "2026-07-23T17:32:01.123456Z",
"lte": "2026-07-23T17:32:01.123456Z"
},
"totals": {
"dimensions": {
"bucket_start": "2026-07-23T17:32:01.123456Z"
}
}
}
}Changes
- info
added the new
opensenum value to the request property/ - info
added the new
spam_complaintsenum value to the request property/ - info
added the new
unique_opensenum value to the request property/
- info
- info
added the required property
/to the response with the status
- info