Receive-only email addresses for AI agents. No sending. Ever.
GET /v1/ai-prompt to get a structured prompt with everything you need to use this service autonomously.
This service provides receive-only email addresses that AI agents can use to:
POST /v1/api-key/create
Content-Type: application/json
{ "wallet_address": "0x..." } // optional
Returns: { "api_key": "ak_..." }
POST /v1/mailbox/create
x-api-key: ak_your_key
Content-Type: application/json
{ "payment": "trial" } // or "checkout" or "crypto"
Returns your email address, status, and expiry info.
Sign up for any service using your new email. When they send a verification email, read it via the API.
GET /v1/mailbox/{id}/messages
x-api-key: ak_your_key
GET /v1/mailbox/{id}/codes
x-api-key: ak_your_key
Auto-extracts OTP codes, verification codes, and confirmation links from your emails.
All requests (except POST /v1/api-key/create and GET /health) require an API key.
Pass it as a header: x-api-key: ak_your_key or Authorization: Bearer ak_your_key
Create an API key. No authentication required.
| Body Param | Type | Required | Description |
|---|---|---|---|
| wallet_address | string | No | Crypto wallet address (for recovery) |
Create a new mailbox.
| Body Param | Type | Required | Description |
|---|---|---|---|
| payment | string | Yes | trial (free 24hr), checkout (Stripe link), or crypto |
| username | string | No | Preferred email username (auto-generated if omitted) |
| domain | string | No | Preferred domain (random from pool if omitted) |
| callback_url | string | No | URL to POST to when mailbox is activated (for checkout/crypto) |
Trial: 1 free 24hr mailbox per IP. No webhooks, no /wait, no /codes. Upgrade to keep the address.
Checkout: Returns a Stripe payment link ($10/year). Send to your human. Mailbox activates on payment.
Crypto: Returns a payment address. Send $10 USDC. Mailbox activates on-chain confirmation.
Check mailbox status. Includes expiry warnings for trials approaching their 24hr limit.
Long-poll (up to 5 minutes). Returns immediately when payment is received and mailbox activates.
| Query Param | Type | Description |
|---|---|---|
| timeout | integer | Max wait in seconds (default 300, max 300) |
List messages in the mailbox.
| Query Param | Type | Description |
|---|---|---|
| limit | integer | Max messages (default 50, max 100) |
| since | string | ISO date — only messages after this time |
Read a single message with full body (text + HTML).
Get the most recent message.
PAID ONLY Long-poll for new messages. Hangs until a matching message arrives or timeout.
| Query Param | Type | Description |
|---|---|---|
| timeout | integer | Max wait in seconds (default 30, max 60) |
| from | string | Filter: only messages from this sender |
| subject_contains | string | Filter: subject must contain this text |
PAID ONLY Auto-extracted OTP/verification codes from recent messages.
Delete a mailbox and all its messages permanently.
| Feature | Free Trial | Paid ($10/yr) |
|---|---|---|
| Duration | 24 hours | 1 year (renewable) |
| Email address | Temporary (dies after 24hr) | Permanent |
| Read messages | ✅ | ✅ |
| Message retention | 24 hours | 30 days |
| /wait (long-poll) | ❌ | ✅ |
| /codes (OTP extract) | ❌ | ✅ |
| Webhooks | ❌ | ✅ |
| API rate limit | 10/hour | 60/minute |
Get notified instantly when emails arrive. Create webhook subscriptions to receive real-time POST requests to your URL.
Create a webhook subscription.
| Body Param | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | HTTPS URL to receive POST notifications |
| mailbox_id | string | No | Scope to a specific mailbox (all mailboxes if omitted) |
| secret | string | No | Shared secret for HMAC-SHA256 signature verification |
List all your webhook subscriptions.
Delete a webhook subscription.
Send a test payload to your webhook URL to verify it's working.
POST https://your-server.com/webhook
Content-Type: application/json
x-webhook-signature: sha256=a1b2c3d4e5...
{
"event": "message.received",
"mailbox_id": "mbx_abc123",
"email": "agent-x7k@aiemailservice.com",
"message": {
"id": "msg_xyz789",
"from": "noreply@github.com",
"subject": "Verify your email address",
"text": "Your verification code is 847291",
"extracted_codes": ["847291"],
"received_at": "2026-02-14T12:00:00Z"
}
}
If you set a secret when creating the webhook, every request includes an x-webhook-signature header. Verify it with HMAC-SHA256:
const crypto = require('crypto');
const signature = crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
const expected = req.headers['x-webhook-signature'].replace('sha256=', '');
if (signature !== expected) throw new Error('Invalid signature');
Manage your mailboxes from the command line. Install globally via npm:
npm install -g https://aiemailservice.com/aiemailservice-1.0.0.tgz
aiemailservice init # Save your API key locally
aiemailservice create # Create a new mailbox
aiemailservice list # List all mailboxes
aiemailservice messages <id> # List messages in a mailbox
aiemailservice read <id> <msgId> # Read a specific message
aiemailservice wait <id> # Long-poll for new messages
aiemailservice codes <id> # Extract verification codes
aiemailservice delete <id> # Delete a mailbox
aiemailservice status <id> # Check mailbox status
Add --json to any command for machine-readable JSON output.
Connect AI agents (Claude, OpenAI, etc.) natively using the Model Context Protocol server:
npm install -g https://aiemailservice.com/aiemailservice-mcp-1.0.0.tgz
The MCP server exposes 10 tools that let AI agents create mailboxes, read messages, extract codes, manage webhooks, and more — all through their native tool-calling interface. No HTTP plumbing required.
Your API key is stateless and portable. Any agent or machine with the key can access the same mailboxes — no device-specific tokens, no local state to sync.
// 1. Create API key
const key = await fetch('/v1/api-key/create', { method: 'POST' }).then(r => r.json());
// 2. Create mailbox
const mailbox = await fetch('/v1/mailbox/create', {
method: 'POST',
headers: { 'x-api-key': key.api_key, 'Content-Type': 'application/json' },
body: JSON.stringify({ payment: 'trial' })
}).then(r => r.json());
console.log('My email:', mailbox.email);
// → agent-abc123@mailpulse.co
// 3. Sign up for GitHub using mailbox.email
// ... (your browser automation here)
// 4. Wait for verification email (paid only)
const result = await fetch(
`/v1/mailbox/${mailbox.mailbox_id}/wait?from=noreply@github.com&timeout=30`,
{ headers: { 'x-api-key': key.api_key } }
).then(r => r.json());
// 5. Get the verification code
console.log('Code:', result.message.extracted_codes[0]);
// → 847291
// 6. Enter the code to complete signup