Skip to Content
1MSG
ReferenceCampaigns API

List campaign cost expenses

GET
/api/v1/campaigns/cost/expenses

Returns per-country expense rows from immutable completion snapshots of completed template campaigns.

  • Each row reports campaignId, campaignName, channelId, completedAt, countryCode, category, and final estimated total in USD, BRL, and RUB.
  • Optional query filters channelId, from, to (snapshot completedAt range), and campaignIds combine with AND.

These amounts are estimates. Volume tiers, free entry points, customer-service windows, and Meta from-to price bands are not modeled, so the figures can differ from Meta's invoice.

Authorization

bearer
headerAuthorizationBearer <API key>

Key issued in Settings → Developer → API key. Inbox methods need the Inbox scope. Campaigns methods need the Campaigns scope.

Query Parameters

channelId?string

Limit to one channel. Combined with the other filters using AND.

from?string

Include snapshots whose completedAt is at or after this instant. Filters campaign_cost_snapshots.completedAt.

Formatdate-time
to?string

Include snapshots whose completedAt is at or before this instant. Filters campaign_cost_snapshots.completedAt.

Formatdate-time
campaignIds?array<string>

Campaign ids. Repeat the parameter or pass a comma-separated list. Combined with the other filters using AND.

format?string

Accepted for compatibility. GET .../cost/expenses returns JSON. GET .../cost/expenses.csv always returns CSV.

Value in"json""csv"

Response Body

application/json
  1. response
rows*array<>
Example Request
curl -X GET 'https://api.1msg.io/api/v1/campaigns/cost/expenses'
Example Response
{  "rows": [    {      "campaignId": "string",      "campaignName": {},      "channelId": "string",      "completedAt": "2019-08-24T14:15:22Z",      "countryCode": "BR",      "category": "MARKETING",      "total": {        "usd": "0.0604",        "brl": "0.3109",        "rub": "4.9404"      }    }  ]}