Misar Docs
MisarMailMisar.BlogMisarReachMisarPostMisar.DevMisar PlatformMisar IdentityMisar Posts API
Api Reference

Analytics

Email performance metrics, campaign analytics, and custom event tracking

Analytics endpoints expose send metrics, engagement rates, and deliverability data at both account and per-campaign level. You can also track custom conversion events to measure downstream impact.

Auth scopes: analytics (read metrics) | send (write tracking events)

Plan gates on analytics features

  • Basic metrics (opens, clicks, bounces): all plans
  • 90-day history: Pro+
  • 365-day history + heatmaps: Max+
  • Revenue analytics (/track/purchase, /analytics/revenue): Max+
  • Ecommerce tracking: Max+ (ecommerce_tracking feature flag)
  • Scheduled / exported reports: Max+

Account overview metrics

GET/mail/v1/analytics/overview

Returns aggregate metrics for all sends in the given time period.

Query parameters

periodstringquerydefault: 30d

Preset period: 7d, 30d, 90d.

fromstringquery

ISO 8601 start date (overrides period).

tostringquery

ISO 8601 end date (overrides period).

Response fields

successboolean

true when the request succeeded.

periodobject

The resolved from and to date range.

metricsobject

Aggregate counts and rates: sends, delivered, opens, unique_opens, clicks, unique_clicks, bounces, hard_bounces, soft_bounces, complaints, unsubscribes, open_rate, click_rate, bounce_rate, complaint_rate.

curl "https://api.misar.io/mail/v1/analytics/overview?period=30d" \
  -H "Authorization: Bearer msk_YOUR_API_KEY"
{
  "success": true,
  "period": {
    "from": "2026-03-07T00:00:00Z",
    "to":   "2026-04-06T23:59:59Z"
  },
  "metrics": {
    "sends":         12480,
    "delivered":     12210,
    "opens":         4884,
    "unique_opens":  3663,
    "clicks":        1221,
    "unique_clicks": 855,
    "bounces":       270,
    "hard_bounces":  48,
    "soft_bounces":  222,
    "complaints":    12,
    "unsubscribes":  36,
    "open_rate":     0.392,
    "click_rate":    0.098,
    "bounce_rate":   0.022,
    "complaint_rate":0.001
  }
}

Per-campaign metrics

GET/mail/v1/analytics/campaigns/:id

Returns detailed metrics for a specific campaign.

Path parameters

idstringpathrequired

ID of the campaign.

Response fields

successboolean

true when the request succeeded.

campaignobject

Campaign summary: id, name, status, sent_at.

metricsobject

Per-campaign counts and rates: total_recipients, total_sent, total_delivered, total_opened, total_clicked, total_bounced, total_complained, total_unsubscribed, open_rate, click_rate, bounce_rate.

timelinearray

Hourly engagement buckets with hour, opens, and clicks.

curl "https://api.misar.io/mail/v1/analytics/campaigns/camp_abc123" \
  -H "Authorization: Bearer msk_YOUR_API_KEY"
{
  "success": true,
  "campaign": {
    "id":     "camp_abc123",
    "name":   "April Newsletter",
    "status": "sent",
    "sent_at":"2026-04-01T09:00:00Z"
  },
  "metrics": {
    "total_recipients": 5200,
    "total_sent":       5200,
    "total_delivered":  5096,
    "total_opened":     2038,
    "total_clicked":    510,
    "total_bounced":    104,
    "total_complained": 5,
    "total_unsubscribed":18,
    "open_rate":        0.392,
    "click_rate":       0.098,
    "bounce_rate":      0.020
  },
  "timeline": [
    { "hour": "2026-04-01T09:00:00Z", "opens": 820, "clicks": 205 },
    { "hour": "2026-04-01T10:00:00Z", "opens": 614, "clicks": 153 }
  ]
}

Track a custom event

POST/mail/v1/track/event

Track a custom event tied to a contact. Useful for measuring downstream conversions from email clicks.

Request body

event_namestringbodyrequired

Snake_case event name.

contact_emailstringbodyrequired

Email of the contact who triggered the event.

propertiesobjectbody

Arbitrary key-value metadata.

timestampstringbody

ISO 8601 — defaults to now.

Response fields

successboolean

true when the event was recorded.

event_idstring

Unique identifier for the tracked event.

curl -X POST https://api.misar.io/mail/v1/track/event \
  -H "Authorization: Bearer msk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event_name":    "trial_started",
    "contact_email": "[email protected]",
    "properties": {
      "plan":    "pro",
      "source":  "welcome_email"
    }
  }'
{ "success": true, "event_id": "evt_xyz789" }

Track a purchase event

POST/mail/v1/track/purchase

Track a purchase event with revenue data. Revenue is attributed to the last clicked campaign within 7 days.

Request body

contact_emailstringbodyrequired

Purchasing contact.

amountnumberbodyrequired

Total order value.

currencystringbodyrequired

ISO 4217 currency code (e.g. USD, INR).

order_idstringbody

Your system's order ID (deduplication key).

itemsarraybody

Line items with name, quantity, price.

Response fields

successboolean

true when the purchase was recorded.

event_idstring

Unique identifier for the purchase event.

attributed_campaign_idstring

Campaign the purchase was attributed to. null if no clicked campaign was found within the attribution window.

curl -X POST https://api.misar.io/mail/v1/track/purchase \
  -H "Authorization: Bearer msk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contact_email": "[email protected]",
    "amount":        99.99,
    "currency":      "USD",
    "order_id":      "order_12345",
    "items": [
      { "name": "Pro Plan", "quantity": 1, "price": 99.99 }
    ]
  }'
{
  "success":  true,
  "event_id": "evt_purchase_abc",
  "attributed_campaign_id": "camp_abc123"
}
Requires Max plan — ecommerce and revenue tracking is a Max-tier feature.

Benchmark against industry

GET/mail/analytics/benchmark

Compare your last-30-day metrics against industry averages (Mailchimp/Campaign Monitor 2024 benchmarks). Cached for 1 hour. Uses session authentication.

Response fields

successboolean

true when the request succeeded.

cachedboolean

Whether the response came from cache.

dataobject

Comparison per metric (openRate, clickRate, bounceRate, unsubscribeRate), each with yours, industry, delta, and better. For open/click, better: true means above average; for bounce/unsubscribe, better: true means below average (lower is better).

curl "https://api.misar.io/mail/analytics/benchmark" \
  -H "Cookie: sb-access-token=YOUR_SESSION"
{
  "success": true,
  "cached": false,
  "data": {
    "openRate":        { "yours": 0.31, "industry": 0.251, "delta": 0.059, "better": true },
    "clickRate":       { "yours": 0.04, "industry": 0.028, "delta": 0.012, "better": true },
    "bounceRate":      { "yours": 0.015, "industry": 0.02, "delta": -0.005, "better": true },
    "unsubscribeRate": { "yours": 0.01,  "industry": 0.009,"delta": 0.001, "better": false }
  }
}

Churn-risk contacts

GET/mail/analytics/churn-risk

Identify contacts at high risk of unsubscribing based on engagement decay patterns. Uses session authentication. Use in combination with POST /api/list-health/win-back to target these contacts.

Query parameters

thresholdnumberquerydefault: 30

Days since last engagement to flag as at-risk.

limitnumberquerydefault: 50

Max contacts to return.

Response fields

successboolean

true when the request succeeded.

dataobject

atRiskCount and a contacts array; each contact includes email, lastEngagedAt, daysSinceEngagement, riskScore, and suggestion.

{
  "success": true,
  "data": {
    "atRiskCount": 243,
    "contacts": [
      {
        "email": "[email protected]",
        "lastEngagedAt": "2026-01-10T00:00:00Z",
        "daysSinceEngagement": 47,
        "riskScore": 0.82,
        "suggestion": "win-back"
      }
    ]
  }
}

Cohort analysis

GET/mail/analytics/cohorts

Cohort analysis — track engagement rates of contacts grouped by the month they subscribed. Uses session authentication.

Query parameters

fromstringquery

ISO 8601 start date for cohorts.

tostringquery

ISO 8601 end date.

metricstringquerydefault: open_rate

One of open_rate, click_rate, unsubscribe_rate.

Response fields

successboolean

true when the request succeeded.

dataobject

A cohorts array; each cohort includes month, contactsAdded, openRate30d, openRate60d, and openRate90d.

{
  "success": true,
  "data": {
    "cohorts": [
      {
        "month": "2026-01",
        "contactsAdded": 420,
        "openRate30d":  0.45,
        "openRate60d":  0.38,
        "openRate90d":  0.31
      }
    ]
  }
}
Cohort data requires Pro+ plan (90-day history required).

Export analytics data

GET/mail/analytics/export

Export analytics data as CSV or JSON. Uses session authentication. Returns a JSON array or a CSV download (Content-Disposition: attachment).

Query parameters

formatstringquerydefault: json

csv or json.

fromstringqueryrequired

ISO 8601 start date.

tostringqueryrequired

ISO 8601 end date.

typestringquerydefault: campaigns

campaigns, contacts, or events.

curl "https://api.misar.io/mail/analytics/export?format=csv&from=2026-01-01&to=2026-03-31&type=campaigns" \
  -H "Cookie: sb-access-token=YOUR_SESSION"
Export of more than 90 days requires Max+ plan.

AI performance insights

GET/mail/analytics/insights

AI-generated insights about your email performance based on the last 30 days of data. Uses session authentication. Plan: Pro+.

Response fields

successboolean

true when the request succeeded.

dataobject

generatedAt plus an insights array; each insight includes type, title, description, and action.

curl "https://api.misar.io/mail/analytics/insights" \
  -H "Cookie: sb-access-token=YOUR_SESSION"
{
  "success": true,
  "data": {
    "generatedAt": "2026-05-27T10:00:00Z",
    "insights": [
      {
        "type": "best_send_time",
        "title": "Tuesday 9–11am is your best send window",
        "description": "Your open rates are 40% higher when emails land Tuesday between 9am–11am your subscribers' local time.",
        "action": "Schedule your next campaign for Tuesday 9am"
      },
      {
        "type": "subject_length",
        "title": "Shorter subjects perform better for you",
        "description": "Subject lines under 45 characters get 25% higher open rates in your account.",
        "action": "Aim for subjects under 45 characters"
      }
    ]
  }
}

List saved reports

GET/mail/analytics/reports

List saved analytics report definitions (scheduled or on-demand). Uses session authentication. Plan: Max+.

Response fields

successboolean

true when the request succeeded.

dataarray

Report definitions. Each includes id, name, type, schedule, recipients, lastRunAt, and nextRunAt.

{
  "success": true,
  "data": [
    {
      "id": "rpt_abc123",
      "name": "Monthly Campaign Summary",
      "type": "campaigns",
      "schedule": "monthly",
      "recipients": ["[email protected]"],
      "lastRunAt": "2026-05-01T09:00:00Z",
      "nextRunAt": "2026-06-01T09:00:00Z"
    }
  ]
}

Revenue attribution

GET/mail/analytics/revenue

Revenue attribution analytics — see which campaigns drove purchases. Requires Max plan with ecommerce tracking enabled. Uses session authentication. Plan: Max+.

Query parameters

fromstringquerydefault: 30 days ago

ISO 8601 start date.

tostringquerydefault: today

ISO 8601 end date.

Response fields

successboolean

true when the request succeeded.

dataobject

totalRevenue, currency, attributedOrders, revenuePerEmail, and a topCampaigns array (each with campaignId, campaignName, revenue, orders, conversionRate).

{
  "success": true,
  "data": {
    "totalRevenue":       15420.50,
    "currency":           "USD",
    "attributedOrders":   83,
    "revenuePerEmail":    0.034,
    "topCampaigns": [
      {
        "campaignId":  "camp_abc123",
        "campaignName":"Spring Sale",
        "revenue":     6200.00,
        "orders":      31,
        "conversionRate": 0.012
      }
    ]
  }
}