How it works
- Create an inbox.
Emailyt returns an unpredictable address atinbox.emailyt.com. - Run your product flow.
Use the address for signup, password reset, receipt, or notification testing. - Poll for messages.
List messages until the expected subject or sender arrives. - Assert and delete.
Inspect structured content, then delete the inbox or let its TTL expire.
/v1/inboxesCreate an inbox
API-key clients use /v1/inboxes. The authenticated dashboard uses an equivalent management path at /v1/test-inboxes.
JSON body
| Field | Type | Description |
|---|---|---|
| label | string | Human-readable label, 1 to 80 characters. Defaults to Test inbox. |
| ttlHours | number | Allowed 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
}/v1/inboxesList active inboxes
Returns up to ten active inboxes for the tenant. Expired and deleted inboxes are omitted.
/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.
/v1/inboxes/{inbox_id}/messagesList 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
}]
}/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.
/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 inboxes | 10 per account | Delete unused inboxes or wait for expiry. |
| Messages | 100 per inbox | Additional messages are not added after the cap. |
| Message size | 5 MB | Oversized raw messages are discarded before parsing. |
| Retention | 1 hour, 24 hours, or 7 days | Objects and noncurrent versions are removed by lifecycle policy within 8 days. |
| Attachments | One-minute URL | Signed downloads require prior tenant authorization. |
Errors
inbox_not_found | 404 | The inbox does not exist, belongs to another tenant, or expired. |
inbox_message_not_found | 404 | The message does not exist within the authorized inbox. |
attachment_not_found | 404 | The attachment does not exist within the authorized message. |
invalid_retention | 422 | Use 1, 24, or 168 hours. |
resource_limit_reached | 409 | Delete an active inbox before creating another. |