Inboxes
Create and manage disposable email inboxes. Each inbox has a unique email address for receiving test emails.
Inboxes are disposable email addresses that receive and store emails. Create as many as you need for your testing workflows.
What is an Inbox?
Each inbox has:
- Unique Address: An email address like
abc123xyz@stamp0.com - Email Storage: Stores all received emails for 30 days
- Status: Active or disabled
- Project Association: Belongs to one project
Creating Inboxes
Via Console
Navigate to Project
Go to the project where you want to create the inbox
Copy Address
Click the copy icon to copy the email address to your clipboard.
Via SDK
import { Stamp0 } from '@stamp0/sdk';
const stamp0 = new Stamp0({ apiKey: process.env.STAMP0_API_KEY });
const inbox = await stamp0.createInbox({
projectId: 'prj_abc123',
});
console.log(inbox.address); // abc123xyz@stamp0.comVia API
curl -X POST https://api.stamp0.com/v1/inboxes \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{"projectId": "prj_abc123"}'Managing Inboxes
Viewing Inboxes
The inbox table shows:
| Column | Description |
|---|---|
| Address | The inbox email address |
| Emails | Number of emails received |
| Created | When the inbox was created |
| Actions | Copy, view emails, delete |
Table Features
- Search: Filter inboxes by address
- Sort: Click column headers to sort
- Pagination: Navigate through large lists
Copying Address
Click the copy icon next to any inbox to copy its address to your clipboard.
Deleting an Inbox
Warning: Deleting an inbox also deletes all emails in it. This cannot be undone.
To delete an inbox:
- Click the delete icon on the inbox row
- Confirm deletion
Using Inboxes in Tests
Basic Pattern
// 1. Create a fresh inbox for this test
const inbox = await stamp0.createInbox({
projectId: process.env.STAMP0_PROJECT_ID,
});
// 2. Use the address in your test
await page.fill('[name="email"]', inbox.address);
await page.click('[type="submit"]');
// 3. Wait for email
const email = await stamp0.waitForEmail({
inboxId: inbox.id,
timeout: 30000,
});
// 4. Extract content (link, OTP, etc.)
const verifyLink = email.body.match(/https?:\/\/[^\s]+verify[^\s]*/)?.[0];One Inbox Per Test
Best practice is to create a fresh inbox for each test:
test('signup flow', async () => {
const inbox = await stamp0.createInbox({ projectId });
// Test uses this inbox only
});
test('password reset', async () => {
const inbox = await stamp0.createInbox({ projectId });
// Test uses a different inbox
});This ensures tests don't interfere with each other.
Reusing Inboxes
If you need the same inbox across multiple test steps:
describe('multi-step flow', () => {
let inbox;
before(async () => {
inbox = await stamp0.createInbox({ projectId });
});
it('step 1: signup', async () => {
// Use inbox.address
});
it('step 2: verify', async () => {
// Same inbox
});
});Inbox Limits
No Hard Limits
There's no limit on the number of inboxes you can create. Create as many as your tests need.
Email Retention
- Emails are stored for 30 days
- After 30 days, emails are automatically deleted
- The inbox remains active
Email Size
- Maximum email size: 25MB
- Larger emails are rejected
Best Practices
Inbox Tips:
- Create fresh inboxes for each test run
- Use descriptive test names to track which inbox belongs to which test
- Don't rely on inbox state between test runs
- Clean up old inboxes periodically (or let them expire naturally)
Test Isolation
Each test should be independent:
// Good: Fresh inbox per test
test('test 1', async () => {
const inbox = await stamp0.createInbox({ projectId });
// ...
});
test('test 2', async () => {
const inbox = await stamp0.createInbox({ projectId });
// ...
});
// Bad: Shared inbox
let sharedInbox;
beforeAll(async () => {
sharedInbox = await stamp0.createInbox({ projectId });
});
test('test 1', async () => { /* uses sharedInbox */ });
test('test 2', async () => { /* uses sharedInbox - may see test 1's emails! */ });API Reference
See the SDK Reference for the complete API:
createInbox()- Create new inboxgetInbox()- Get inbox detailsdeleteInbox()- Delete inboxgetEmails()- List emails in inboxwaitForEmail()- Wait for email to arrive