Sandbox mode
Run your whole email integration without sending a single real email. Sandbox mode uses test API keys and separate shadow mailboxes. Messages, threads, rules, and webhooks look exactly as they do in live mode.
Last updated
Create a test key
Go to Developer > API keys, create a key, and choose Test. Test keys start with sm_test_. The key sets the mode. No request flag can switch between test and live.
What is isolated
- Messages and threads live apart from your real mailbox data.
- No sandbox send ever reaches SES, SMTP, or a real recipient.
- Sandbox sends don't touch live quota, suppression, reputation, or analytics.
- Scheduled sends, AI assistant automation runs, drafts, retries, and webhooks stay in test mode.
- Webhook records have
modeset to test, and webhook payloads havetestset to true.
Simulate an outbound result
Send through the normal message endpoint with a test key. Set sandbox_outcome to delivered, bounced, or complained. Leave it out and you get delivered.
curl -X POST https://shipmail.to/api/v1/messages \
-H "Authorization: Bearer sm_test_..." \
-H "Content-Type: application/json" \
-d '{
"mailbox_id": "MAILBOX_ID",
"to": ["customer@example.com"],
"subject": "Sandbox test",
"text": "This message will not be delivered.",
"sandbox_outcome": "bounced"
}'A live key that sends sandbox_outcome gets an error.
Inject a fake inbound message
Use this to test replies, threading, AI assistant automations, and received-message webhooks. The addresses you pass are just message data. Shipmail never contacts them.
curl -X POST https://shipmail.to/api/v1/mailboxes/MAILBOX_ID/sandbox/inbound \
-H "Authorization: Bearer sm_test_..." \
-H "Content-Type: application/json" \
-d '{
"from": "customer@example.com",
"subject": "Re: Sandbox test",
"text": "Looks good",
"message_id": "<sandbox-reply-1@example.com>"
}'TypeScript SDK
const testClient = new ShipmailClient({ apiKey: "sm_test_..." });
await testClient.messages.send({
mailbox_id: "MAILBOX_ID",
to: ["customer@example.com"],
subject: "Sandbox test",
text: "Not delivered",
sandbox_outcome: "complained",
});
await testClient.mailboxes.injectSandboxInbound("MAILBOX_ID", {
from: "customer@example.com",
subject: "Re: Sandbox test",
text: "A fake inbound reply",
});Inspect activity in the dashboard
Open Developer > Sandbox to see recent test activity for each mailbox. Check recipients and the simulated delivery status, preview the rendered message, or compare its HTML and plain-text bodies. None of it shows up in the live inbox.
Reading test data
List messages, threads, and webhook deliveries with the same test key. Messages and webhook deliveries come back with a mode field. Live keys can't read test data, and test keys can't read live data.