Send email from a custom subdomain via micropayment — $0.005/email, no API keys or accounts.
What it does
StableEmail's `/api/subdomain/send` endpoint lets you send email from any address on a custom subdomain (e.g., `you@yourname.stableemail.dev`) for $0.005 USDC per message. It uses the x402/MPP micropayment protocol: the first request returns a 402 challenge, you sign a USDC payment on Base, Solana, or Tempo, then resend with the payment header attached. No API keys, no accounts — wallet identity is derived from the payment itself. The payer wallet must be the subdomain owner or an authorized signer.
Before using this endpoint you need to purchase a subdomain via `POST /api/subdomain/buy` ($5 one-time). Once DNS verification completes (~5 minutes), you can send from any `localpart@yourname.stableemail.dev` address. Up to 50 authorized signer wallets can be added per subdomain. The request body requires `from` (your subdomain address), `to` (array of up to 50 recipients), and `subject`. Either `html` or `text` (or both) must be provided. Optional attachments (max 5, base64-encoded, ~3.75 MB decoded limit each) are supported. Emails are delivered via AWS SES.
The broader StableEmail platform also offers shared-domain sending at $0.02/email (`/api/send`), forwarding inboxes at $1/month (`/api/inbox/buy`), subdomain inboxes with programmatic message reading, and free management endpoints authenticated via SIWX (Sign-In With X). Agent integration is available through the agentcash MCP server (`npx -y agentcash@latest`) or any x402/MPP-compatible client.
Capabilities
Use cases
- —AI agents sending branded emails from a custom subdomain without managing SMTP credentials
- —Automated notifications or alerts from a dedicated subdomain address
- —Wallet-authenticated email sending where the payer's crypto wallet serves as identity
- —Sending transactional emails with attachments (invoices, receipts, calendar invites) at $0.005 each
- —Multi-tenant apps where each tenant gets a subdomain with authorized signer wallets
Fit
Best for
- —AI agents and bots that need to send email programmatically without API key management
- —Developers who want pay-per-use email with crypto micropayments instead of monthly subscriptions
- —Projects needing branded subdomain email without configuring DNS, DKIM, or SMTP servers
Not for
- —High-volume bulk/marketing email campaigns (50 recipients per call limit, per-send cost)
- —Users who need traditional email accounts with IMAP/POP access
- —Organizations requiring email sending from their own top-level domain (only *.stableemail.dev subdomains)
Quick start
curl -X POST https://stableemail.dev/api/subdomain/send \
-H 'Content-Type: application/json' \
-d '{
"from": "hello@yourname.stableemail.dev",
"to": ["alice@example.com"],
"subject": "Hello from my subdomain",
"text": "Sent via StableEmail micropayment."
}'
# Returns 402 → sign USDC payment → resend with payment headerExample
Request
{
"to": [
"alice@example.com"
],
"from": "hello@yourname.stableemail.dev",
"html": "<p>This email was sent via StableEmail.</p>",
"text": "This email was sent via StableEmail.",
"replyTo": "you@example.com",
"subject": "Hello from my subdomain"
}Response
{
"from": "hello@yourname.stableemail.dev",
"success": true,
"messageId": "ses-abc123"
}Endpoint
Quality
Full OpenAPI 3.1 schema with detailed request bodies, clear pricing ($0.005 USDC), comprehensive guidance document, and live endpoint (POST-only, so HEAD/GET returning 405 is expected). Docs page returns 404 but the llms.txt guidance is thorough. Minor gap: no captured 402 challenge on this specific endpoint since the probe only tried HEAD/GET.
Warnings
- —Probe returned 405 because HEAD/GET were tried on a POST-only endpoint; the endpoint is expected to be live for POST requests
- —The /docs page returns 404; all documentation comes from the OpenAPI spec and llms.txt guidance
- —Subdomains are under *.stableemail.dev only — you cannot use your own top-level domain
Citations
- —Subdomain send costs $0.005 USDC per emailhttps://stableemail.dev
- —Subdomain purchase costs $5 USDC one-timehttps://stableemail.dev
- —Payer wallet must be owner or authorized signer for the subdomainhttps://stableemail.dev
- —Up to 50 authorized wallet signers per subdomainhttps://stableemail.dev
- —Supports Base (eip155:8453), Solana, or Tempo for USDC paymenthttps://stableemail.dev
- —Attachments max 5 per email, base64-encoded, ~3.75MB decoded limit eachhttps://stableemail.dev
- —Agent integration via agentcash MCP server (npx -y agentcash@latest)https://stableemail.dev