Skip to main content
GET
/
v1
/
campaigns
/
{id}
/
stats
Node.js SDK
import Migma from 'migma';

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.campaigns.stats('CAMPAIGN_ID');
{
  "success": true,
  "data": {
    "totalSent": 123,
    "totalDelivered": 123,
    "uniqueOpens": 123,
    "totalOpens": 123,
    "uniqueClicks": 123,
    "totalClicks": 123,
    "unsubscribes": 123,
    "bounces": 123,
    "openRate": 123,
    "clickRate": 123,
    "lastUpdated": "2023-11-07T05:31:56Z",
    "botOpens": 123,
    "botClicks": 123,
    "mppOpens": 123
  },
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where YOUR_API_KEY is obtained from the Migma dashboard under Settings → API Integration.

Path Parameters

id
string
required

Campaign ID

Response

Campaign stats

success
boolean
required
data
object

Aggregate engagement stats for a campaign. Sourced from the tracking worker; may be cached and slightly stale.

error
string | null