API ReferenceStats
Get top campaigns by metric
Get top campaigns by metric (message count or cost), enriched with entity data
x-api-key<token>
Project-scoped API key. Keys carry either the ADMIN or TENANT role; a route additionally requires that the key's role is listed in its x-required-roles. Machine-to-machine callers should use this.
In: header
Query Parameters
metric?string
Default
"SMS_COUNT"Value in
- "SMS_COUNT"
- "SMS_COST"
limit?string
Default
"10"Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/stats/campaigns/top"{ "data": [ { "campaignId": "string", "metricValue": 0, "tenantId": "string", "name": "string", "description": "string", "status": "active", "createdAt": 0, "updatedAt": 0, "startedAt": 0, "completedAt": 0 } ]}