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.

Set up once
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#

POST/api/v1/temp-mail/inboxes

Makes a fresh address that accepts mail right away. Use the returned address in your sign-up form and keep the id.

Parameters

  • ttl_minutesnumberbody

    How long it lives. Up to 43,200 on Pro.

  • labelstringbody

    Your own note, shown in the dashboard.

  • prefixstringbody

    Pick the part before @. Random if left out.

  • domainstringbody

    One of your domains (see Domains & quota). Defaults to the first shared one.

Request
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"
  }'
Response201
{
  "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#

GET/api/v1/temp-mail/inboxes/{inbox_id}

Long-polls the inbox and returns its messages. One-time codes and verify links are already pulled out for you.

Parameters

  • inbox_idstringpathrequired

    The id from Create inbox.

  • waitnumberquery

    Seconds to hold the request open until mail arrives (max 25). 0 returns at once.

  • sinceISO datequery

    Only messages received after this time. Pass the last receivedAt to poll for new ones.

Request
curl "https://boostmails.com/api/v1/temp-mail/inboxes/$INBOX_ID?wait=25" \
  -H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"
Response200
{
  "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#

GET/api/v1/temp-mail/messages/{message_id}

The full message: plain text, sanitized HTML and the attachment list.

Parameters

  • message_idstringpathrequired

    A message id from Wait for mail.

Request
curl "https://boostmails.com/api/v1/temp-mail/messages/$MESSAGE_ID" \
  -H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"
Response200
{
  "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#

GET/api/v1/temp-mail/messages/{message_id}/attachments/{index}

Streams the file with its original name and content type.

Parameters

  • message_idstringpathrequired

    A message id from Wait for mail.

  • indexnumberpathrequired

    The attachment's index from Read message (0, 1, …).

Request
curl -OJ "https://boostmails.com/api/v1/temp-mail/messages/$MESSAGE_ID/attachments/0" \
  -H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"
Response200
# 200 OK, the raw file
content-type: application/pdf
content-disposition: attachment; filename="invoice.pdf"

Extend inbox#

PATCH/api/v1/temp-mail/inboxes/{inbox_id}

Keeps an inbox alive longer while a test is still running.

Parameters

  • inbox_idstringpathrequired

    The id from Create inbox.

  • extend_minutesnumberbody

    Minutes to add (default 10). Capped by maxExpiresAt.

Request
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
  }'
Response200
{
  "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#

DELETE/api/v1/temp-mail/inboxes/{inbox_id}

Deletes the inbox, its messages and files now instead of at expiry.

Parameters

  • inbox_idstringpathrequired

    The id from Create inbox.

Request
curl -X DELETE "https://boostmails.com/api/v1/temp-mail/inboxes/$INBOX_ID" \
  -H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"
Response200
{
  "ok": true
}

Send#

Send emailPro & Team#

POST/api/v1/temp-mail/inboxes/{inbox_id}/send

Queues mail from the temp address. It goes out within seconds; check Sent mail for the result.

Parameters

  • inbox_idstringpathrequired

    The id from Create inbox.

  • tostring | string[]bodyrequired

    Up to 5 recipients, counting cc.

  • ccstring | string[]body

    Optional copies.

  • subjectstringbodyrequired

    Required for new mail.

  • textstringbody

    Plain text body.

  • markdownstringbody

    Use instead of text for bold, links and lists. HTML isn't accepted.

Request
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."
  }'
Response202
{
  "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#

POST/api/v1/temp-mail/inboxes/{inbox_id}/send

Answers a received message in the same thread.

Parameters

  • inbox_idstringpathrequired

    The id from Create inbox.

  • reply_to_message_idstringbodyrequired

    The message you're answering. Recipient, subject and threading are filled in.

  • textstringbody

    Plain text body (or markdown).

Request
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."
  }'
Response202
{
  "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#

GET/api/v1/temp-mail/inboxes/{inbox_id}/send

What this inbox sent, newest first, with status queued, sent or failed.

Parameters

  • inbox_idstringpathrequired

    The id from Create inbox.

Request
curl "https://boostmails.com/api/v1/temp-mail/inboxes/$INBOX_ID/send" \
  -H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"
Response200
{
  "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#

GET/api/v1/temp-mail/domains

Domains you can create addresses on and how much of this plan's quota is used.

Request
curl "https://boostmails.com/api/v1/temp-mail/domains" \
  -H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"
Response200
{
  "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#

GET/api/v1/temp-mail/inboxes

Every live inbox in this workspace.

Request
curl "https://boostmails.com/api/v1/temp-mail/inboxes" \
  -H "Authorization: Bearer $BOOSTMAILS_TEMP_KEY"
Response200
{
  "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.