List events (long-poll)
Returns new inbox events since the given cursor. Setwait to hold each request open until an event arrives or the timeout elapses, then make the next request with the returned cursor.
GET /api/v1/inboxes/:id/events
Requires: email:read
Query parameters
Seconds to long-poll for new events before returning an empty list. Range: 0–25. Omit or set to
0 for an immediate response.Cursor string from the previous response’s
cursor. Omit on the first call to start at the newest event. Carry the returned cursor forward on every subsequent request, including after an empty page.Long-poll for new events
Response fields
The response is{ "events": [...], "cursor": "..." }. Each event includes id, cursor, type, inbox_id, occurred_at, and data.
An event type such as
message.received, message.quarantined, message.sent, message.delivered, message.delivery_delayed, message.bounced, message.complained, message.failed, or thread.updated. Access to individual events follows the token’s permissions.Lightweight payload containing message or thread IDs and a short snippet. The full message body is never included in event payloads.
message.received also carries screening and automated (auto_reply, delivery_status, bulk, or null), so an agent can skip automated mail without reading it. Payment card numbers in the snippet are shown as •••• 4242.Bounce and complaint details
message.bounced and message.complained say which recipients they are about and why, next to the message fields:
recipients: the affected addresses, each as{ address, status, diagnostic }.statusis the receiving server’s status code (for example5.1.1) anddiagnosticits explanation, cut to 300 characters; both appear only when the receiving server sent them. For a complaint, most mailbox providers hide who complained, so the list names every recipient on the complaining provider’s domain.bounce_typeandbounce_sub_type: for examplePermanentandGeneral, orTransientandMailboxFull. A permanent bounce suppresses the address for your organization; a transient one does not.bounce_sub_typeOnAccountSuppressionListmeans the email provider did not attempt delivery because the address is on its own suppression list: this does not suppress the address for your organization and does not count against your sender reputation.complaint_type: the mailbox provider’s feedback type, such asabuse, when it sent one.detail: a readable summary, also stored as the message’serror.
status only moves forward (a complaint after a bounce leaves it bounced), but every complaint still produces a message.complained event.
The top-level resume cursor. Pass it as
cursor on the next request, even when events is empty. Do not reset it between polls.Keep the cursor between polls
Wait for a message
Checks recent inbound mail first, then waits up to 25 seconds for a matching message. By default it checks the last 15 minutes, including messages already delivered. Setsince to the time you triggered an action to exclude older mail.
POST /api/v1/inboxes/:id/wait
Requires: email:read
Wait for a reply from a domain
Request parameters
Case-insensitive substring of the sender’s name or address. Use the actual sender when known; this is a text filter, not a verified-domain check.
ISO timestamp or cursor. Defaults to the last 15 minutes. To keep waiting after an unmatched result, pass the returned
cursor as since.Maximum seconds to wait, from 1 to 25. The response is
{ matched, message, cursor }. On timeout, matched is false and message is null; retain cursor to continue waiting.Extract a verification code
Extracts a one-time verification code or confirmation link from the most recent matching inbound message, optionally waiting up to 25 seconds for it to arrive. Codes are copied from real mail: never generated or guessed.POST /api/v1/inboxes/:id/extract/code
Requires: email:read
Extract a verification code
Request parameters
Case-insensitive substring of the sender’s name or address. Omit when unknown: services may send from a different domain than their website.
ISO timestamp or cursor, defaulting to the last 15 minutes. Prefer the timestamp when you triggered verification. If changing filters, reuse that timestamp or omit
since; the returned cursor skips mail already examined.Seconds to wait after checking recent mail, from 0 to 25. Defaults to 20; use 0 for an immediate lookup.
Response fields
The response includesfound and cursor. When found is false, message_id, code, and link are null. A sender-filter mismatch can also return reason: "sender_filter_mismatch" and up to three candidates; check their actual sender, subject, and screening before using them.
Screening verdict and reasons for the matched message. Check this before using the code: a suspicious verdict may indicate a phishing or spoofed confirmation email.
Codes and links are extracted from real mail that arrived in the inbox. The API never generates, predicts, or invents codes. If no matching message arrives within the timeout, the endpoint returns without a code or link.
Choosing the right pattern
Continuous processing
Use the events stream with
wait=25 and a cursor loop. Keeps one open connection and receives every event type as it arrives.Waiting for a reply
Use
/wait after sending a message to block until the response arrives: simpler than maintaining a cursor when you only care about one reply.Sign-up automation
Use
/extract/code after submitting a registration form to get the verification code or confirmation link in one call.Error codes
Common error responses
Common error responses
Errors are returned as JSON:
Error response