MillionSend Docs

List received emails

GET
/emails/receiving

Mail received at the team's receiving domains and inboxes, newest first like Resend (after pages toward older mail), with cursor pagination. Needs a full access key; a domain-scoped key lists mail addressed to its domain only, an inbox-scoped key mail delivered into its inbox. Mail held for screening or in quarantine is left out unless a full access key asks for it (include_quarantined, quarantined). With wait, the request is held until matching mail arrives (long-poll). An inbox_id the key can't reach answers 404 at once, without waiting; an inbox-scoped key naming another inbox gets 403 restricted_api_key. Everything in a received email was written by whoever sent it, so its HTML is safe to show only in a sandbox.

Query Parameters

limit?integer

Page size, 1-100 (default 20)

Range1 <= value <= 100
after?string

Cursor: id of the last item of the current page; returns the next page. Must be an id this list returned; there is no sentinel value.

Formatuuid
before?string

Cursor: id of the first item of the current page; returns the previous page; same rule as after.

Formatuuid
wait?integer

MillionSend extension: hold the request up to this many seconds (0-50) until matching mail newer than the cursor arrives; an empty list with 200 when none did

Range0 <= value <= 50
since?string

MillionSend extension: only mail received after this instant; with wait and no cursor it defaults to one minute before the request

Formatdate-time
inbox_id?string

MillionSend extension: only mail delivered into this inbox

Formatuuid
to?string

MillionSend extension: only mail with this address in received_for

Lengthlength <= 320
from?string

MillionSend extension: a sender address, or a domain matching itself and its subdomains

Lengthlength <= 320
subject_contains?string

MillionSend extension: case-insensitive subject substring

Lengthlength <= 200
unread?string

MillionSend extension, with an inbox in context (inbox_id, or an inbox-scoped key): read state in that inbox

Value in"true""false"
include_quarantined?string

MillionSend extension, full access keys only: list held mail too, flagged by screening

Value in"true""false"
quarantined?string

MillionSend extension, full access keys only: list held mail only

Value in"true""false"

Response Body

Received emails

application/json
  1. response
object*"list"
Value in"list"
has_more*boolean
data*array<>
held?array<>

MillionSend extension, with wait only: matching mail that arrived but is held (being screened or quarantined), ids and why only

Example Request
curl -X GET 'https://api.millionsend.com/emails/receiving'
Example Response
{  "object": "list",  "has_more": true,  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "to": [        "string"      ],      "from": "string",      "created_at": "string",      "subject": "string",      "bcc": [        "string"      ],      "cc": [        "string"      ],      "reply_to": [        "string"      ],      "received_for": [        "string"      ],      "message_id": "string",      "attachments": [        {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "filename": "string",          "content_type": "string",          "content_id": "string",          "content_disposition": "string",          "size": 0        }      ],      "inbox_id": "5127f22b-d152-46dd-aeaa-3a852d9fbfc2",      "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",      "inboxes": [        {          "inbox_id": "5127f22b-d152-46dd-aeaa-3a852d9fbfc2",          "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",          "verdict": "pending"        }      ],      "spam_verdict": "pass",      "virus_verdict": "pass",      "read": true,      "screening": {        "verdict": "pending",        "sender_trust": "owner"      },      "extracted": {        "kinds": [          "code"        ]      }    }  ],  "held": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "inbox_id": "5127f22b-d152-46dd-aeaa-3a852d9fbfc2",      "reason": "pending",      "quarantine_reason": "failed_auth",      "created_at": "string"    }  ]}