SMTPBox REST API reference
API endpoints for inboxes, message search, waiting for email, message bodies, headers, attachments and usage.
API reference
All endpoints use https://api.smtpbox.dev, JSON responses and a Bearer API key. Successful responses contain success: true and data; errors contain success: false and an error object.
/v1/inboxesList inboxes
/v1/inboxesCreate an inbox
/v1/inboxes/{inbox_id}Get an inbox
/v1/inboxes/{inbox_id}Rename or disable an inbox
/v1/inboxes/{inbox_id}Delete an inbox
/v1/inboxes/{inbox_id}/messagesList the latest 50 messages
/v1/inboxes/{inbox_id}/messagesClear an inbox
/v1/inboxes/{inbox_id}/messages/waitWait up to 25 seconds for a match
/v1/messages/{message_id}Get message metadata
/v1/messages/{message_id}/{html|text|raw}Get a message body
/v1/messages/{message_id}/headersGet parsed headers
/v1/messages/{message_id}/attachmentsList attachments
/v1/attachments/{attachment_id}Download an attachment
/v1/messages/{message_id}Delete a message
/v1/usageRead plan and current usage
Create an inbox
curl -X POST https://api.smtpbox.dev/v1/inboxes \
-H "Authorization: Bearer sbx_api_your_key" \
-H "Content-Type: application/json" \
-d '{"project_id":"prj_your_project","name":"CI"}'Filter and wait for messages
The list endpoint accepts search, matching sender, recipient or subject. For test suites, the wait endpoint accepts to and subject substring filters and checks the latest 50 messages until the first match arrives. timeout is clamped to 1–25 seconds.
curl "https://api.smtpbox.dev/v1/inboxes/box_123/messages/wait?timeout=20&to=qa%40example.test&subject=Reset" \
-H "Authorization: Bearer sbx_api_your_key"Updated