Retrieve campaign
GET /campaigns/:id — fetch a single campaign.
/campaigns/:idReturns the campaign object for one of your campaigns. Campaigns created via both the API and the dashboard can be retrieved.
idstringrequiredThe 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
objectstringoptionalAlways campaign.
idstringoptionalThe campaign ID.
namestring | nulloptionalThe internal name of the campaign.
audience_idstringoptionalThe contact pool the campaign targets — the id of the domain’s per-domain audience.
segment_idstring | nulloptionalThe segment the campaign is narrowed to, or null.
topic_idstring | nulloptionalThe topic gate, or null.
fromstring | nulloptionalThe sender address.
subjectstring | nulloptionalThe subject line.
reply_tostring | string[] | nulloptionalThe Reply-To address(es), or null if unset.
preview_textstring | nulloptionalThe inbox preview text, or null if unset.
htmlstring | nulloptionalThe HTML body, or null if unset.
textstring | nulloptionalThe plain-text body, or null if unset.
statusstringoptionalOne of draft, scheduled, queued, paused, canceled, sent, failed, or recurring. See Statuses.
scheduled_atstring | nulloptionalISO 8601 send time if scheduled, otherwise null.
sent_atstring | nulloptionalISO 8601 time the send began, otherwise null.
created_atstringoptionalISO 8601 creation time.
ab_testobjectoptionalA/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 | nulloptionalRecurrence config { interval, every } for a recurring campaign, or null.
parent_campaign_idstring | nulloptionalFor a recurring child send, the ID of the template campaign; null otherwise.
statisticsobjectoptionalAggregate delivery and engagement stats: the counts total, delivered, opened, clicked, replied, bounced, complained, plus a rates object with delivery, open, click, reply, bounce and complaint percentages, each rounded to one decimal place. open, click and reply rates use delivered as the denominator (falling back to total when no delivery events were recorded); delivery, bounce and complaint use total. `GET /campaigns/:id/stats` returns these same fields alongside a links array.
followupsarrayoptionalFollow-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 | nulloptionalThe List-Unsubscribe mailbox for this campaign, or null to use the account default.
unsubscribe_policystringoptionalHow unsubscribes are scoped: account (default), domain, or ignore.
{
"object": "campaign",
"id": "8f5c2a1e-7b3d-4f9a-9c12-2e6d4a7b8c90",
"name": "June newsletter",
"audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
"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": {
"total": 1240,
"delivered": 1216,
"opened": 498,
"clicked": 96,
"replied": 12,
"bounced": 18,
"complained": 1,
"rates": {
"delivery": 98.1,
"open": 41,
"click": 7.9,
"reply": 1,
"bounce": 1.5,
"complaint": 0.1
}
}
}not_found if the campaign does not exist or is not yours.