API Reference

Retrieve campaign

GET /campaigns/:id — fetch a single campaign.

GET/campaigns/:id

Returns the campaign object for one of your campaigns. Campaigns created via both the API and the dashboard can be retrieved.

Path parameters
idstringrequired

The campaign ID.

import { MailBlastr } from 'mailblastr';

const mb = new MailBlastr('mb_xxxxxxxxx');

const { data, error } = await mb.campaigns.get('8f5c2a1e-7b3d-4f9a-9c12-2e6d4a7b8c90');
console.log({ data, error });

Response

Response fields
objectstringoptional

Always campaign.

idstringoptional

The campaign ID.

namestring | nulloptional

The internal name of the campaign.

audience_idstringoptional

The contact pool the campaign targets — the id of the domain’s per-domain audience.

segment_idstring | nulloptional

The segment the campaign is narrowed to, or null.

topic_idstring | nulloptional

The topic gate, or null.

fromstring | nulloptional

The sender address.

subjectstring | nulloptional

The subject line.

reply_tostring | string[] | nulloptional

The Reply-To address(es), or null if unset.

preview_textstring | nulloptional

The inbox preview text, or null if unset.

htmlstring | nulloptional

The HTML body, or null if unset.

textstring | nulloptional

The plain-text body, or null if unset.

statusstringoptional

One of draft, scheduled, queued, sent, failed, or recurring.

scheduled_atstring | nulloptional

ISO 8601 send time if scheduled, otherwise null.

sent_atstring | nulloptional

ISO 8601 time the send began, otherwise null.

created_atstringoptional

ISO 8601 creation time.

ab_testobjectoptional

A/B test configuration. Always present. { enabled: false } when A/B is not active; when active includes subject_b, test_pct, metric, status, and winner.

recurrenceobject | nulloptional

Recurrence config { interval, every } for a recurring campaign, or null.

parent_campaign_idstring | nulloptional

For a recurring child send, the ID of the template campaign; null otherwise.

statisticsobjectoptional

Aggregate delivery and engagement stats (same shape as GET /campaigns/:id/stats).

followupsarrayoptional

Follow-up sends configured on the campaign — each { id, condition, delay, subject, html, status, run_at, sent_count }. condition is one of opened, clicked, not_opened, not_clicked, replied, not_replied; delay is a duration like "5 hours" or "4 days". Empty array when none.

list_addressstring | nulloptional

The List-Unsubscribe mailbox for this campaign, or null to use the account default.

unsubscribe_policystringoptional

How unsubscribes are scoped: account (default), domain, or ignore.

{
  "object": "campaign",
  "id": "8f5c2a1e-7b3d-4f9a-9c12-2e6d4a7b8c90",
  "name": "June newsletter",
  "audience_id": "aud_3b1c...",
  "segment_id": null,
  "topic_id": null,
  "from": "Acme <news@yourdomain.com>",
  "subject": "What's new in June",
  "reply_to": null,
  "preview_text": "Check out what shipped this month",
  "html": "<p>Hi {{FIRST_NAME}}!</p>",
  "text": "Hi {{FIRST_NAME}}!",
  "status": "sent",
  "scheduled_at": null,
  "sent_at": "2026-06-23T10:20:00.000Z",
  "created_at": "2026-06-23T10:00:00.000Z",
  "ab_test": { "enabled": false },
  "recurrence": null,
  "parent_campaign_id": null,
  "statistics": {}
}
Errors: not_found if the campaign does not exist or is not yours.