Skip to content

MailerGetEmails

GET mailer/emails/list

Returns the email history of the brand, joined with provider, profile and template names. Supports the platform list contract: paging, sorting, grouping, aggregates and filters.

For deliverability and engagement reports prefer MailerGetStats: it aggregates on the server instead of paging raw rows.

Access Control

Allowed roles: admin, leader, manager. Scoped to the brand of the caller.

Request

GET request
GET https://{broker_domain}/mailer/emails/list?limit=20&orderBy=%5B%22id%22%2C%22DESC%22%5D&where=%7B%22sendToParentId%22%3A140%7D&count=%5B%22id%22%5D
Authorization: <JWT_TOKEN>
{
  "command": "MailerGetEmails",
  "extID": "1",
  "data": {
    "limit": 20,
    "orderBy": [
      "id",
      "DESC"
    ],
    "where": {
      "sendToParentId": 140
    },
    "count": [
      "id"
    ]
  }
}
const res = await platform.MailerGetEmails({
  limit: 20,
  orderBy: [
    "id",
    "DESC"
  ],
  where: {
    sendToParentId: 140
  },
  count: [
    "id"
  ]
});

Request Data

Field Type Required Description
limit int No Page size, 1..1000, default 100
offset int No Rows to skip
orderBy array No Sorting, for example ["id", "DESC"]
groupBy array No Grouping, including date grouping such as DAY({field})
count array No Row count aggregate, ["id"]
where object No Filters; grouped orWhere is supported, see Table filter syntax

Response Data

count appears only when it was requested — a row count is an extra query, so it is opt-in.

{
  "rows": [
    {
      "id": 812,
      "brand": "default",
      "providerId": 1,
      "profileId": 3,
      "templateId": 4,
      "campaignId": null,
      "managerId": 10,
      "sendToParentType": "CUSTOMER",
      "sendToParentId": 140,
      "email": "[email protected]",
      "subject": "Your deposit is confirmed",
      "kind": "TRANSACTIONAL",
      "status": "DELIVERED",
      "externalId": "prov-99213",
      "bounceType": null,
      "openCount": 1,
      "clickCount": 0,
      "attempts": 1,
      "isTest": false,
      "providerName": "postmark",
      "sentAt": "2026-08-24 13:32:41",
      "deliveredAt": "2026-08-24 13:32:49"
    }
  ],
  "count": [ { "id": 128 } ]
}

Errors

Code Error Description
400 VALIDATION_ERROR Unknown field in a filter or aggregate