DocumentationFetch email logs

Fetch email logs

List sent emails and their status from the JavaScript SDK.

Use getLogs to page through your sent emails and their delivery status.

import { MailingCore } from 'mailingcore-js'

MailingCore.init({ apiKey: 'mc_live_...' })

const { data, meta } = await MailingCore.getLogs({ page: 1, limit: 20 })

Parameters

OptionTypeDefault
pagenumber1
limitnumber20

getLogs paginates only — there are no status or date filters in the SDK today.

Response

A paginated list of email logs:

{
  "data": [
    {
      "id": "...",
      "toEmail": "[email protected]",
      "subject": "...",
      "status": "DELIVERED",
      "provider": "...",
      "messageId": "...",
      "createdAt": "...",
      "tags": []
    }
  ],
  "meta": { "page": 1, "limit": 20, "total": 0, "totalPages": 0 }
}

Under the hood this calls GET /emails/logs, which requires an API key with the email:read scope. See Email statuses for the status values and Email logs for the REST endpoint.