Skip to main content

Sending history

Two lists show what you sent and to whom:

RequestList rowPeriod
GET /api/v1/public/emails/recipientsA delivery to one recipientThe account's entire history
GET /api/v1/public/emailsAn email with all its recipientsEmails accepted since ДД.ММ.ГГГГ

To search by recipient or delivery status, use the delivery list; to examine an email as a whole — with all its to, cc, and bcc — use the email list.

Before you start​

  • A token with the email.read scope.

Common to both lists​

  • Order — newest first.
  • Pagination — by cursor, forward only: limit from 1 to 100 (20 by default) and cursor from the previous response's nextCursor. While hasMore: true, the response contains nextCursor; on the last page hasMore: false and nextCursor: null. The response doesn't include the total number of records.
  • Cursor — an opaque string: don't parse it or build it yourself. A cursor only works with the same filters as the first request and only for the same list; it doesn't expire. A cursor from other filters, from the other list, or a corrupted one returns 400 BAD_REQUEST with details: [{ "field": "cursor", "reason": "INVALID_CURSOR" }].
  • New sends don't shift the pages: as you page back in time, you get no duplicates and miss no records. New records appear at the start of the list — you see them when you request without a cursor.
  • Dates dateFrom and dateTo — an ISO 8601 date or date-time in UTC, bounds inclusive. A date without a time means the whole UTC day: dateTo=2026-10-19 includes all of October 19.
  • keyId — only records of one sending key. Key not found — 404 SENDING_KEY_NOT_FOUND.
  • Rate limit — 60 per minute per API key for each list; when it's exceeded you get 429 RATE_LIMIT_EXCEEDED and a Retry-After header.

Deliveries​

GET /api/v1/public/emails/recipients — a row for every recipient of every email, including sends from before ДД.ММ.ГГГГ.

ParameterMeaning
limit, cursorPage size and cursor — see Common
keyIdSending key
statusComma-separated delivery statuses: queued, sending, delivered, suppressed, bounced, failed
dateFrom, dateToWhen the delivery was accepted
toRecipient address or part of it
fromSender address
let cursor: string | null = null;
while (true) {
const params = new URLSearchParams({ status: 'bounced,failed', dateFrom: '2026-10-01', limit: '100' });
if (cursor) params.set('cursor', cursor);
const response = await fetch(`https://api.emailmassivo.com/api/v1/public/emails/recipients?${params}`, {
headers: { 'Authorization': `Bearer ${process.env.API_TOKEN}` },
});
if (response.status === 429) {
await new Promise((r) => setTimeout(r, Number(response.headers.get('Retry-After') ?? 1) * 1000));
continue;
}
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const { data } = await response.json();
for (const delivery of data.items) console.log(delivery.email, delivery.status, delivery.reason?.code);
if (!data.nextCursor) break;
cursor = data.nextCursor;
}
{
"ok": true,
"data": {
"items": [
{
"id": "c4a07e13-5d2b-4e8f-b916-7f3a2d0c8b44",
"emailId": "0199b2f4-6c1e-7a3d-9f2b-4e8c1d7a5b60",
"email": "manager@shop.com",
"name": null,
"type": "cc",
"status": "bounced",
"reason": {
"code": "DELIVERY_MAILBOX_FULL",
"bounceType": "transient",
"message": "Recipient mailbox is full."
},
"keyId": 42,
"from": { "email": "noreply@shop.com", "name": "Shop" },
"subject": "Order confirmation",
"createdAt": "2026-09-30T10:15:00.000Z",
"sentAt": "2026-09-30T10:15:02.310Z",
"completedAt": "2026-09-30T10:15:05.020Z"
}
],
"hasMore": true,
"nextCursor": "Q2xvc2VkIGJvb2sgY3Vyc29yIGV4YW1wbGU"
},
"meta": { "requestId": "01JB2W...", "timestamp": "2026-09-30T10:16:00.000Z" }
}
FieldMeaning
idDelivery identifier — the same as the email's recipients[].id and recipient.id in webhooks
emailIdThe email the delivery belongs to: open it with GET /api/v1/public/emails/{emailId}. null for sends from before ДД.ММ.ГГГГ
emailRecipient address
name, typeRecipient name and type (to, cc, bcc); null for sends from before ДД.ММ.ГГГГ
status, reasonDelivery status and reason — without the recipient server's SMTP response, which is in the delivery details
keyIdSending key
fromSender; name is null for sends from before ДД.ММ.ГГГГ
subjectSubject
createdAt, sentAt, completedAtAcceptance, handoff for sending, and final status — as for an email recipient

Emails​

GET /api/v1/public/emails — a row per email with all its recipients. The list contains emails accepted since ДД.ММ.ГГГГ by any method, including SMTP. Earlier sends are only in the delivery list.

ParameterMeaning
limit, cursorPage size and cursor — see Common
keyIdSending key
dateFrom, dateToWhen the email was accepted
fromSender address

The email list has no status or recipient filters — use the delivery list for those.

curl "https://api.emailmassivo.com/api/v1/public/emails?keyId=42&limit=20" \
-H "Authorization: Bearer $API_TOKEN"

A list item is an email in the same shape as GET /api/v1/public/emails/{emailId}, but its recipients have no events and no SMTP response in reason. Events and the SMTP response are available when reading the email and in the delivery details.

Handling errors​

HTTPerror.codeCauseAction
400BAD_REQUESTInvalid filter or cursor — the field is in details[].fieldFix the parameter; on INVALID_CURSOR, start from the first page
403SCOPE_REQUIREDThe token lacks the email.read scopeAdd the scope to the token
404SENDING_KEY_NOT_FOUNDNo key with this keyIdCheck keyId
429RATE_LIMIT_EXCEEDEDMore than 60 requests per minuteRetry after the pause from Retry-After

See also​