List inbox messages programmatically via MPP micropayment ($0.001 USDC per call).
What it does
This endpoint lists messages in a StableEmail forwarding inbox (username@stableemail.dev). It is part of the StableEmail platform, which provides pay-per-use email delivery, forwarding inboxes, and custom subdomains — all authenticated via x402/MPP micropayments with no API keys or accounts required.
POST /api/inbox/messages accepts a JSON body with a required `username` field (the inbox name), plus optional `cursor` (for pagination) and `limit` (1–100, default 20). The endpoint costs $0.001 USDC per call, settled on Base (eip155:8453), Solana, or Tempo via the MPP protocol. The payer wallet must be the inbox owner. The response returns a paginated list of message summaries including id, sender email, subject, received date, and read status, along with a `nextCursor` for fetching subsequent pages.
To use this endpoint, the inbox must have `retainMessages` enabled (set via POST /api/inbox/update). Message content and attachments are retained for 90 days. The inbox itself is purchased for $1/30 days via POST /api/inbox/buy. Individual messages can then be read in full via POST /api/inbox/messages/read ($0.001) or deleted via POST /api/inbox/messages/delete (free, SIWX auth). The recommended agent integration path is via the agentcash-skills MCP server (`npx -y agentcash@latest`), which handles payment negotiation automatically.
Capabilities
Use cases
- —AI agent checking a disposable inbox for verification codes or replies
- —Programmatically polling a forwarding inbox for new inbound emails
- —Building an email monitoring workflow that lists and triages messages
- —Automated customer support reading inbound messages from a shared inbox
Fit
Best for
- —AI agents needing programmatic email inbox access without API keys
- —Developers wanting pay-per-use email reading with no account setup
- —Workflows that need to poll a forwarding inbox for new messages
Not for
- —High-volume email retrieval requiring IMAP/POP3 protocols
- —Users who need free email inbox access without micropayments
- —Reading emails from external mailboxes (Gmail, Outlook, etc.)
Quick start
# List messages in your StableEmail inbox
# First request returns 402; pay via MPP/x402, then resend with payment header
curl -X POST https://stableemail.dev/api/inbox/messages \
-H 'Content-Type: application/json' \
-d '{"username": "alice", "limit": 20}'Example
Request
{
"limit": 20,
"cursor": null,
"username": "alice"
}Response
{
"success": true,
"messages": [
{
"id": "msg_abc123",
"read": false,
"subject": "Meeting tomorrow",
"fromEmail": "bob@example.com",
"receivedAt": "2025-01-15T10:30:00Z"
},
{
"id": "msg_def456",
"read": true,
"subject": "Your verification code",
"fromEmail": "noreply@service.com",
"receivedAt": "2025-01-15T09:15:00Z"
}
],
"nextCursor": "msg_def456"
}Endpoint
Quality
Full OpenAPI 3.1 schema with detailed request/response documentation from x-guidance. The endpoint is a POST (probe tried HEAD/GET and got 405, which is expected). Pricing is clearly documented at $0.001 USDC. Response schema is described in guidance text but not formally in OpenAPI responses section.
Warnings
- —Probe returned 405 because it tried HEAD/GET on a POST-only endpoint; the endpoint is expected to be live when called with POST and proper MPP payment.
- —No formal OpenAPI response schema defined — response structure is inferred from x-guidance documentation only.
- —The /docs page returns 404; all documentation comes from the OpenAPI x-guidance field and the landing page.
Citations
- —POST /api/inbox/messages costs $0.001 USDC per callhttps://stableemail.dev
- —Accepts username, cursor, and limit parameters; returns paginated message list with id, fromEmail, subject, receivedAt, read fieldshttps://stableemail.dev/.well-known/x402
- —Payment accepted on Base, Solana, or Tempo via x402/MPP protocolhttps://stableemail.dev
- —Payer wallet must be the inbox ownerhttps://stableemail.dev
- —Requires retainMessages enabled on the inbox; message content retained for 90 dayshttps://stableemail.dev
- —Recommended agent integration via agentcash-skills MCP serverhttps://stableemail.dev