API Reference

Retrieve contact

GET /contacts/:id — fetch a contact by id or email.

GET/contacts/:id

Retrieve a single contact. The :id segment accepts either the contact id or its email. An id is exact; when addressing by email, pass ?domain= to say which of your sending domains the contact lives on (each domain keeps its own contact records).

Path parameters
idstringrequired

The contact’s id *or* its email — either value is accepted in this path segment.

Query parameters
domainstringoptional

The sending domain the contact belongs to. Needed when addressing by email; an id is exact, so domain is not required then.

Request
import { MailBlastr } from 'mailblastr';

const mb = new MailBlastr('mb_xxxxxxxxx');

const { data, error } = await mb.contacts.get({ id: 'steve@example.com', domain: 'yourdomain.com' });
console.log({ data, error });
Response (200)
{
  "object": "contact",
  "id": "479e3145-dd0e-4f64-bf48-1d4b6d4cd8f6",
  "email": "steve@example.com",
  "first_name": "Steve",
  "last_name": "Wozniak",
  "unsubscribed": false,
  "properties": {
    "company_name": "Acme Corp",
    "department": "Engineering"
  },
  "created_at": "2026-06-23T17:30:11.000Z"
}

The properties map is always present and includes every registered contact property — the contact's own value wins; if a property has no value set, the property's fallback_value is used instead. An unknown contact returns 404 not_found. See Errors.

Audience-scoped variant

The nested route GET /audiences/:audience_id/contacts/:id still works and scopes the lookup to one audience (no domain query needed):

Request (audience-scoped)
import { MailBlastr } from 'mailblastr';

const mb = new MailBlastr('mb_xxxxxxxxx');

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