Emails
Read emails, wait for new ones, extract OTPs.
Emails
List Emails
GET /v1/inboxes/:id/emailsReturns all emails in an inbox, newest first.
{
"emails": [
{
"id": "eml_xyz789",
"inbox_id": "inb_abc123",
"from": "noreply@github.com",
"to": ["github-bot@lumbox.co"],
"subject": "Your verification code",
"text_body": "Your code is 847291",
"parsed": {
"otp_codes": ["847291"],
"verification_links": [],
"category": "verification"
},
"received_at": "2025-01-01T00:01:00.000Z"
}
]
}Wait for Email
GET /v1/inboxes/:id/wait?timeout=60Long-polls until a new email arrives or timeout (in seconds). No polling loops needed — one request, one response.
| Param | Type | Default | Description |
|---|---|---|---|
timeout | number | 30 | Max seconds to wait |
from | string | — | Filter by sender |
subject | string | — | Filter by subject keyword |
Get OTP
GET /v1/inboxes/:id/otp?timeout=60Waits for an email containing an OTP code and returns just the code. The simplest way to get a verification code.
| Param | Type | Default | Description |
|---|---|---|---|
timeout | number | 30 | Max seconds to wait |
from | string | — | Filter by sender |
{
"otp": "847291",
"email_id": "eml_xyz789",
"from": "noreply@github.com",
"subject": "Your verification code"
}Get Email
GET /v1/emails/:idDelete Email
DELETE /v1/emails/:idSearch Emails
GET /v1/emails/search?q=github&inbox_id=inb_abc123Search across emails by keyword, sender, or category.