API Reference

List Send Sources

GET /emails/sources — per-source send and engagement rollups for campaigns, automations and individual sends.

GET/emails/sources

Rolls up every email on your account by what sent it and returns one row per source: one per campaign, one per automation, and a single individual row covering direct `POST /emails` sends. Use it for a one-request overview of which surfaces are sending and how that mail is performing, without walking `GET /emails` yourself. Read-only; requires a read-scoped key.

Rows are ordered by last_sent_at, newest activity first. This endpoint takes no query parameters and is not paginated: it returns every source in one response and has_more is always false.

import { Mailblastr } from 'mailblastr';

const mb = new Mailblastr('mb_xxxxxxxxx');

const { data, error } = await mb.emails.sources();
console.log({ data, error });

Response

Response fields
kindstringoptional

The source type: campaign, automation, or individual.

idstring | nulloptional

The campaign or automation id. Always null for the individual row.

namestring | nulloptional

The campaign or automation name. null when the parent campaign or automation has since been deleted; for an unnamed campaign the subject line stands in here instead.

subjectstring | nulloptional

The campaign subject line, as a secondary label. null for automation and individual rows, and null when the subject was already used as name.

statusstring | nulloptional

The current campaign or automation status. null for the individual row and for a deleted parent.

totalnumberoptional

Emails attributed to this source.

sentnumberoptional

How many of those were actually handed off for delivery (they have a sent_at).

deliverednumberoptional

Recorded delivered events for this source.

openednumberoptional

Recorded opened events. These are raw event counts, not unique recipients — one recipient opening twice counts twice.

clickednumberoptional

Recorded clicked events, counted the same raw way as opened.

repliednumberoptional

Recorded replied events.

failednumberoptional

Emails from this source in the failed status.

last_sent_atstring | nulloptional

ISO 8601 creation time of the newest email in the group, or null when the group is empty.

{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "kind": "campaign",
      "id": "8f5c2a1e-7b3d-4f9a-9c12-2e6d4a7b8c90",
      "name": "June newsletter",
      "subject": "What's new in June",
      "status": "sent",
      "total": 1240,
      "sent": 1240,
      "delivered": 1216,
      "opened": 612,
      "clicked": 104,
      "replied": 12,
      "failed": 0,
      "last_sent_at": "2026-06-23T10:20:00.000Z"
    },
    {
      "kind": "automation",
      "id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
      "name": "Welcome series",
      "subject": null,
      "status": "enabled",
      "total": 318,
      "sent": 318,
      "delivered": 311,
      "opened": 190,
      "clicked": 44,
      "replied": 3,
      "failed": 0,
      "last_sent_at": "2026-06-22T18:04:00.000Z"
    },
    {
      "kind": "individual",
      "id": null,
      "name": null,
      "subject": null,
      "status": null,
      "total": 47,
      "sent": 47,
      "delivered": 47,
      "opened": 29,
      "clicked": 8,
      "replied": 1,
      "failed": 0,
      "last_sent_at": "2026-06-21T09:12:00.000Z"
    }
  ]
}
The individual row is omitted entirely when the account has never sent a direct email. A campaign or automation that was deleted still appears while its emails remain in the logs, with name and status as null.