Skip to main content
GET
/
api
/
v1
/
emails
List Emails
curl --request GET \
  --url https://api.example.com/api/v1/emails
{
  "data": [
    {
      "id": "<string>",
      "from": "<string>",
      "to": [
        "<string>"
      ],
      "cc": [
        "<string>"
      ],
      "bcc": [
        "<string>"
      ],
      "subject": "<string>",
      "status": "<string>",
      "messageId": "<string>",
      "templateId": "<string>",
      "createdAt": "<string>",
      "sentAt": "<string>",
      "deliveredAt": "<string>",
      "openedAt": "<string>",
      "clickedAt": "<string>"
    }
  ],
  "pagination": {
    "page": 123,
    "limit": 123,
    "total": 123,
    "totalPages": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.mailbreeze.com/llms.txt

Use this file to discover all available pages before exploring further.

List sent emails with optional filtering by status, recipient, date range, and more.

Query Parameters

page
integer
default:"1"
Page number for pagination.
limit
integer
default:"20"
Number of items per page (max 100).
status
string
Filter by email status: queued, sent, delivered, bounced, or failed.
to
string
Filter by recipient email address.
from
string
Filter by sender email address.
startDate
string
Filter by date range start (ISO 8601 format).
endDate
string
Filter by date range end (ISO 8601 format).

Examples

import { MailBreeze } from "mailbreeze";

const mailbreeze = new MailBreeze({ apiKey: "sk_live_xxx" });

// List all emails
const { data, pagination } = await mailbreeze.emails.list();

console.log(`Found ${pagination.total} emails`);

// List with filters
const { data } = await mailbreeze.emails.list({
  status: "delivered",
  startDate: "2024-01-01T00:00:00Z",
  endDate: "2024-01-31T23:59:59Z",
  page: 1,
  limit: 50,
});

for (const email of data) {
  console.log(`${email.id}: ${email.subject} -> ${email.to.join(", ")}`);
}

Response

data
array
Array of email objects.
pagination
object
Pagination metadata.
Example Response
{
  "success": true,
  "data": {
    "emails": [
      {
        "id": "msg_abc123",
        "from": "hello@yourdomain.com",
        "to": ["user@example.com"],
        "subject": "Welcome!",
        "status": "delivered",
        "messageId": "abc123@mailbreeze.com",
        "createdAt": "2024-01-15T10:30:00Z",
        "sentAt": "2024-01-15T10:30:01Z",
        "deliveredAt": "2024-01-15T10:30:05Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 150,
      "totalPages": 8
    }
  },
  "meta": {
    "timestamp": "2024-01-15T10:30:00.000Z",
    "requestId": "req_abc123",
    "path": "/api/v1/emails"
  }
}