API Reference

List Sent Emails

GET /emails — list the emails your account has sent, newest first.

GET/emails

List the emails your account has sent. The list returns a reference to each email; use an email's id to fetch its full body and event log with GET /emails/:id, or its attachments.

This endpoint returns only emails sent by your account. To list emails received by your domains, use GET /emails/receiving.

This endpoint is always paginated. See Pagination for navigating with limit, after, and before.

Query parameters

limitnumberoptional

Number of emails to retrieve per page. Default 20, maximum 100, minimum 1.

afterstringoptional

The email id after which more emails are retrieved (the next page). The passed id is not included. Cannot be combined with before.

beforestringoptional

The email id before which more emails are retrieved (the previous page). The passed id is not included. Cannot be combined with after.

statusstringoptional

Return only emails whose current state matches, compared against the same value as last_event — e.g. delivered, opened, bounced, scheduled, failed.

searchstringoptional

Case-insensitive substring match on the recipients, subject, or sender. Applied across the whole list, not just the current page. q is accepted as an alias.

campaign_idstringoptional

Return only emails sent by that campaign. Takes precedence over automation_id and source if more than one is supplied.

automation_idstringoptional

Return only emails sent by that automation. Ignored when campaign_id is also supplied.

sourcestringoptional

Pass source=individual to return only one-off API sends — emails that belong to no campaign and no automation. Honoured only when neither campaign_id nor automation_id is supplied.

domain_idstringoptional

Return only emails sent from that sending domain. Composes with the filters above.

Request

import { Mailblastr } from 'mailblastr';

const mb = new Mailblastr('mb_xxxxxxxxx');

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

Response

A paginated list object. Each item in data is an email reference with its id, addressing, subject, last_event, and timestamps.

{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c",
      "object": "email",
      "message_id": "<111-222-333@email.example.com>",
      "to": ["delivered@example.com"],
      "from": "Acme <hello@yourdomain.com>",
      "created_at": "2026-06-23T22:13:42.674Z",
      "subject": "Hello World",
      "bcc": null,
      "cc": null,
      "reply_to": null,
      "last_event": "delivered",
      "scheduled_at": null
    }
  ]
}

Errors

Returns validation_error if limit is outside 1–100 or if both before and after are supplied. A malformed or unknown cursor is not an error — it returns an empty page (data: [], has_more: false). See the error reference.