EEmailytDocumentationOpen dashboard
Inbox API

Test real email flows without using a personal mailbox.

Create a short-lived address, send email from your application, then assert on the message body, links, headers, attachments, and authentication results from a test or live Emailyt API key.

How it works

  1. Create an inbox.
    Emailyt returns an unpredictable address at inbox.emailyt.com.
  2. Run your product flow.
    Use the address for signup, password reset, receipt, or notification testing.
  3. Poll for messages.
    List messages until the expected subject or sender arrives.
  4. Assert and delete.
    Inspect structured content, then delete the inbox or let its TTL expire.
Isolation: every operation is scoped to the tenant associated with the bearer key. Knowing an inbox or message ID does not grant access.
POST/v1/inboxes

Create an inbox

API-key clients use /v1/inboxes. The authenticated dashboard uses an equivalent management path at /v1/test-inboxes.

JSON body

FieldTypeDescription
labelstringHuman-readable label, 1 to 80 characters. Defaults to Test inbox.
ttlHoursnumberAllowed values: 1, 24, or 168.
curl https://api.emailyt.com/v1/inboxes \
  --request POST \
  --header "Authorization: Bearer $EMAILYT_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"label":"Signup test","ttlHours":1}'

Response

HTTP/1.1 201 Created
Location: /v1/inboxes/inbox_7d6c...

{
  "id": "inbox_7d6c9f2d15f04cbea97b8bb845e4e081",
  "label": "Signup test",
  "address": "8f26c17411a4c2ec8ed36c80@inbox.emailyt.com",
  "status": "active",
  "ttlHours": 1,
  "expiresAt": 1795366800,
  "messageCount": 0
}
GET/v1/inboxes

List active inboxes

Returns up to ten active inboxes for the tenant. Expired and deleted inboxes are omitted.

DELETE/v1/inboxes/{inbox_id}

Delete an inbox

Immediately disables the address and makes its messages inaccessible. Stored objects remain subject to the short lifecycle policy and are permanently removed automatically.

GET/v1/inboxes/{inbox_id}/messages

List messages

Returns newest messages first. Set limit from 1 to 100; the default is 50.

{
  "data": [{
    "id": "010001example-message-id",
    "inboxId": "inbox_7d6c...",
    "envelopeTo": "8f26c1...@inbox.emailyt.com",
    "receivedAt": "2026-11-22T18:42:10.000Z",
    "subject": "Verify your account",
    "from": [{"name":"Build Bot","address":"bot@example.com"}],
    "authentication": {
      "spam": "PASS", "virus": "PASS", "spf": "PASS",
      "dkim": "PASS", "dmarc": "PASS"
    },
    "attachmentCount": 0,
    "size": 2841
  }]
}
GET/v1/inboxes/{inbox_id}/messages/{message_id}

Retrieve message content

Returns structured HTML, plain text, headers, extracted HTTP links, recipient fields, attachment metadata, and SES authentication and scanning verdicts.

Render safely: message HTML is untrusted input. Use a sandboxed iframe with scripts, forms, navigation, plugins, and remote resources disabled. Never inject it into your application DOM.
GET/v1/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}

Download an attachment

Returns a one-minute signed download URL and attachment metadata. Attachments are persisted only when the SES malware verdict is PASS; blocked attachment metadata has blocked: true and cannot be downloaded. Do not log, cache, or share signed URLs.

Node.js CI example

const api = "https://api.emailyt.com/v1";
const headers = {
  authorization: `Bearer ${process.env.EMAILYT_API_KEY}`,
  "content-type": "application/json",
};

const inbox = await fetch(`${api}/inboxes`, {
  method: "POST",
  headers,
  body: JSON.stringify({ label: "CI signup", ttlHours: 1 }),
}).then((response) => response.json());

await runSignupFlow(inbox.address);

let message;
const deadline = Date.now() + 60_000;
while (!message && Date.now() < deadline) {
  const result = await fetch(
    `${api}/inboxes/${inbox.id}/messages`,
    { headers },
  ).then((response) => response.json());
  message = result.data.find((item) =>
    item.subject === "Verify your account"
  );
  if (!message) await new Promise((resolve) => setTimeout(resolve, 2_000));
}

if (!message) throw new Error("Verification email did not arrive");
const detail = await fetch(
  `${api}/inboxes/${inbox.id}/messages/${message.id}`,
  { headers },
).then((response) => response.json());

if (detail.authentication.virus !== "PASS") {
  throw new Error("Inbound malware scan did not pass");
}
if (!detail.links.some((url) => url.includes("/verify"))) {
  throw new Error("Verification link is missing");
}

await fetch(`${api}/inboxes/${inbox.id}`, {
  method: "DELETE",
  headers,
});

Limits and retention

Active inboxes10 per accountDelete unused inboxes or wait for expiry.
Messages100 per inboxAdditional messages are not added after the cap.
Message size5 MBOversized raw messages are discarded before parsing.
Retention1 hour, 24 hours, or 7 daysObjects and noncurrent versions are removed by lifecycle policy within 8 days.
AttachmentsOne-minute URLSigned downloads require prior tenant authorization.

Errors

inbox_not_found404The inbox does not exist, belongs to another tenant, or expired.
inbox_message_not_found404The message does not exist within the authorized inbox.
attachment_not_found404The attachment does not exist within the authorized message.
invalid_retention422Use 1, 24, or 168 hours.
resource_limit_reached409Delete an active inbox before creating another.