Audience

Managing unsubscribed contacts

How a contact becomes unsubscribed and why campaigns skip them.

Every contact carries an `unsubscribed` boolean. When it is true, the contact has opted out: campaigns skip them entirely and they receive no further campaign email to that audience.

Honoring opt-outs is not optional — it keeps your sending compliant and protects your domain reputation.

Why it matters

Keeping your list up to date as people unsubscribe protects your sender reputation. Specifically, honoring opt-outs:

  • reduces the likelihood of your emails being marked as spam, and
  • improves deliverability for every other marketing and transactional email you send.

Subscription statuses

A contact’s status reflects the unsubscribed flag:

StatusMeaning
Subscribedunsubscribed: false — the contact still receives campaigns to this audience.
Unsubscribedunsubscribed: true — the contact has opted out and is skipped by every campaign.

The audience-wide unsubscribed flag is the global subscription state. It is distinct from per-topic subscriptions: a contact can stay subscribed to the audience while opting out of an individual topic. The global flag always wins — a globally unsubscribed contact is never emailed even if they are opted in to a topic.

How a contact becomes unsubscribed

  • Campaign unsubscribe link — every campaign includes a per-contact unsubscribe link. When a recipient clicks it, that contact is flipped to unsubscribed: true.
  • Manual toggle — you can set unsubscribed yourself when creating a contact or by updating one with PATCH.

Unsubscribing a contact via the API

Patch the contact (by id or email) with unsubscribed: true. Patches are partial, so this changes only the subscribe state and leaves the name fields untouched.

import { MailBlastr } from 'mailblastr';

const mb = new MailBlastr('mb_xxxxxxxxx');

const { data, error } = await mb.contacts.update({
  audienceId: 'AUDIENCE_ID',
  id: 'steve@example.com',
  "unsubscribed": true
});
console.log({ data, error });

To re-subscribe a contact (for example, if they opted back in), patch the same contact with unsubscribed: false.

Unsubscribed contacts stay on the audience — they are not deleted — so your list size and history are preserved. They are simply excluded from every campaign until re-subscribed.