API reference
Temp mail API
Create temp inboxes, wait for verification codes, read messages and attachments, and send or reply on Pro and Team.
Create throwaway inboxes from tests, CI or scripts, long-poll for the verification code, and (on Pro and Team) send or reply. Create a bmt_ key on the Temp inboxes page; it can only reach your workspace's temp inboxes.
export BOOSTMAILS_TEMP_KEY="bmt_…"A typical sign-up test: Create inbox → type inbox.address into the form → Wait for mail with wait=25 → read messages[0].otp or verifyLink → Delete inbox.
Receive#
Create inbox#
Makes a fresh address that accepts mail right away. Use the returned address in your sign-up form and keep the id.
Parameters
ttl_minutesnumberbodyHow long it lives. Up to 43,200 on Pro.
labelstringbodyYour own note, shown in the dashboard.
prefixstringbodyPick the part before @. Random if left out.
domainstringbodyOne of your domains (see Domains & quota). Defaults to the first shared one.
curl -X POST "https://boostmails.com/api/v1/temp-mail/inboxes" \
-H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY" \
-H "content-type: application/json" \
-d '{
"ttl_minutes": 30,
"label": "signup test"
}'{
"ok": true,
"inbox": {
"id": "5f0c2a9e-41d7-4b8a-9c3e-7d21a6f0b4c1",
"address": "[email protected]",
"label": "signup test",
"createdAt": "2026-11-30T09:00:00.000Z",
"expiresAt": "2026-11-30T09:30:00.000Z",
"maxExpiresAt": "2026-12-30T09:00:00.000Z",
"canExtend": true,
"messageCount": 0,
"reported": false
}
}Wait for mail#
Long-polls the inbox and returns its messages. One-time codes and verify links are already pulled out for you.
Parameters
inbox_idstringpathrequiredThe id from Create inbox.
waitnumberquerySeconds to hold the request open until mail arrives (max 25). 0 returns at once.
sinceISO datequeryOnly messages received after this time. Pass the last receivedAt to poll for new ones.
curl "https://boostmails.com/api/v1/temp-mail/inboxes/$INBOX_ID?wait=25" \
-H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"{
"ok": true,
"inbox": {
"id": "5f0c2a9e-41d7-4b8a-9c3e-7d21a6f0b4c1",
"address": "[email protected]",
"label": "signup test",
"createdAt": "2026-11-30T09:00:00.000Z",
"expiresAt": "2026-11-30T09:30:00.000Z",
"maxExpiresAt": "2026-12-30T09:00:00.000Z",
"canExtend": true,
"messageCount": 1,
"reported": false
},
"messages": [
{
"id": "b83e6d10-2f4a-4c59-8e1b-0a9d7c6e5f32",
"fromAddr": "[email protected]",
"fromName": "Example",
"subject": "Your code",
"preview": "Your verification code is 482913. It expires in 10 minutes.",
"otp": "482913",
"verifyLink": null,
"hasHtml": true,
"attachments": [],
"receivedAt": "2026-11-30T09:00:12.000Z"
}
]
}Nothing arrived? You get the same shape with an empty messages list, so just call it again.
Read message#
The full message: plain text, sanitized HTML and the attachment list.
Parameters
message_idstringpathrequiredA message id from Wait for mail.
curl "https://boostmails.com/api/v1/temp-mail/messages/$MESSAGE_ID" \
-H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"{
"ok": true,
"message": {
"id": "b83e6d10-2f4a-4c59-8e1b-0a9d7c6e5f32",
"inboxId": "5f0c2a9e-41d7-4b8a-9c3e-7d21a6f0b4c1",
"fromAddr": "[email protected]",
"fromName": "Example",
"subject": "Your code",
"text": "Your verification code is 482913.\nIt expires in 10 minutes.",
"html": "<p>Your verification code is <b>482913</b>.</p>",
"hasHtml": true,
"otp": "482913",
"verifyLink": null,
"attachments": [
{
"filename": "invoice.pdf",
"mimeType": "application/pdf",
"size": 48213,
"downloadable": true,
"blocked": null,
"index": 0
}
],
"receivedAt": "2026-11-30T09:00:12.000Z"
}
}Attachment file#
Streams the file with its original name and content type.
Parameters
message_idstringpathrequiredA message id from Wait for mail.
indexnumberpathrequiredThe attachment's index from Read message (0, 1, …).
curl -OJ "https://boostmails.com/api/v1/temp-mail/messages/$MESSAGE_ID/attachments/0" \
-H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"# 200 OK, the raw file
content-type: application/pdf
content-disposition: attachment; filename="invoice.pdf"Extend inbox#
Keeps an inbox alive longer while a test is still running.
Parameters
inbox_idstringpathrequiredThe id from Create inbox.
extend_minutesnumberbodyMinutes to add (default 10). Capped by maxExpiresAt.
curl -X PATCH "https://boostmails.com/api/v1/temp-mail/inboxes/$INBOX_ID" \
-H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY" \
-H "content-type: application/json" \
-d '{
"extend_minutes": 60
}'{
"ok": true,
"inbox": {
"id": "5f0c2a9e-41d7-4b8a-9c3e-7d21a6f0b4c1",
"address": "[email protected]",
"label": "signup test",
"createdAt": "2026-11-30T09:00:00.000Z",
"expiresAt": "2026-11-30T10:30:00.000Z",
"maxExpiresAt": "2026-12-30T09:00:00.000Z",
"canExtend": true,
"messageCount": 0,
"reported": false
}
}Delete inbox#
Deletes the inbox, its messages and files now instead of at expiry.
Parameters
inbox_idstringpathrequiredThe id from Create inbox.
curl -X DELETE "https://boostmails.com/api/v1/temp-mail/inboxes/$INBOX_ID" \
-H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"{
"ok": true
}Send#
Send emailPro & Team#
Queues mail from the temp address. It goes out within seconds; check Sent mail for the result.
Parameters
inbox_idstringpathrequiredThe id from Create inbox.
tostring | string[]bodyrequiredUp to 5 recipients, counting cc.
ccstring | string[]bodyOptional copies.
subjectstringbodyrequiredRequired for new mail.
textstringbodyPlain text body.
markdownstringbodyUse instead of text for bold, links and lists. HTML isn't accepted.
curl -X POST "https://boostmails.com/api/v1/temp-mail/inboxes/$INBOX_ID/send" \
-H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY" \
-H "content-type: application/json" \
-d '{
"to": "[email protected]",
"subject": "Question about my account",
"text": "Hi, I can't find my invoice."
}'{
"ok": true,
"sent": {
"id": "0d7a4c2b-9e18-4f63-a5b0-3c8e1f9d2a74",
"inboxId": "5f0c2a9e-41d7-4b8a-9c3e-7d21a6f0b4c1",
"from": "[email protected]",
"to": [
"[email protected]"
],
"cc": [],
"subject": "Question about my account",
"replyToMessageId": null,
"status": "queued",
"error": null,
"via": "api",
"createdAt": "2026-11-30T09:05:00.000Z",
"sentAt": null
}
}Reply to messagePro & Team#
Answers a received message in the same thread.
Parameters
inbox_idstringpathrequiredThe id from Create inbox.
reply_to_message_idstringbodyrequiredThe message you're answering. Recipient, subject and threading are filled in.
textstringbodyPlain text body (or markdown).
curl -X POST "https://boostmails.com/api/v1/temp-mail/inboxes/$INBOX_ID/send" \
-H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY" \
-H "content-type: application/json" \
-d '{
"reply_to_message_id": "b83e6d10-2f4a-4c59-8e1b-0a9d7c6e5f32",
"text": "Thanks, confirmed."
}'{
"ok": true,
"sent": {
"id": "e2c91b5f-6a03-4d7e-b8f4-1a5c0e9d3b26",
"inboxId": "5f0c2a9e-41d7-4b8a-9c3e-7d21a6f0b4c1",
"to": [
"[email protected]"
],
"subject": "Re: Your code",
"replyToMessageId": "b83e6d10-2f4a-4c59-8e1b-0a9d7c6e5f32",
"status": "queued"
}
}Sent mailPro & Team#
What this inbox sent, newest first, with status queued, sent or failed.
Parameters
inbox_idstringpathrequiredThe id from Create inbox.
curl "https://boostmails.com/api/v1/temp-mail/inboxes/$INBOX_ID/send" \
-H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"{
"ok": true,
"sent": [
{
"id": "0d7a4c2b-9e18-4f63-a5b0-3c8e1f9d2a74",
"to": [
"[email protected]"
],
"subject": "Question about my account",
"status": "sent",
"error": null,
"sentAt": "2026-11-30T09:05:03.000Z"
}
]
}Account#
Domains & quota#
Domains you can create addresses on and how much of this plan's quota is used.
curl "https://boostmails.com/api/v1/temp-mail/domains" \
-H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"{
"ok": true,
"shared": [
"tmp.boostmails.com"
],
"custom": [
{
"domain": "test.yourcompany.com",
"status": "active",
"verified": true
}
],
"quota": {
"plan": "Pro",
"inboxesToday": 12,
"activeInboxes": 3,
"messagesToday": 41,
"apiInboxesThisMonth": 280,
"maxLifeMinutes": 43200,
"sentToday": 4
}
}The quota object has a matching …Limit field for every counter.
List inboxes#
Every live inbox in this workspace.
curl "https://boostmails.com/api/v1/temp-mail/inboxes" \
-H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"{
"ok": true,
"inboxes": [
{
"id": "5f0c2a9e-41d7-4b8a-9c3e-7d21a6f0b4c1",
"address": "[email protected]",
"label": "signup test",
"createdAt": "2026-11-30T09:00:00.000Z",
"expiresAt": "2026-11-30T09:30:00.000Z",
"maxExpiresAt": "2026-12-30T09:00:00.000Z",
"canExtend": true,
"messageCount": 1,
"reported": false
}
]
}Limits depend on the plan (inboxes a day and a month, live at once, life, storage, sends). See Temp mail for the table. Every inbox holds up to 50 messages of 25 MB each.