Email inbox API for AI agents: read, search, draft, send, and triage mail over Streamable HTTP.
Full LLM thinking from the 4-phase benchmark pipeline.
{
"service_type": "rest_api",
"base_url": "https://console.mermail.app",
"auth_method": "none",
"auth_config": {"header": "PAYMENT-SIGNATURE", "prefix": null},
"endpoints": [
{
"path": "/api",
"method": "GET",
"purpose": "Public $0 x402 identity handshake; returns API base, agent marketplace base, docs, and OpenAPI URLs. Unpaid returns 402 with x402 accepts[].",
"params": {},
"response_format": "json",
"is_primary": true
},
{
"path": "/api/agent/v1/mailboxes",
"method": "POST",
"purpose": "Create a hosted agent inbox. Keyless; payment ($2 x402/MPP) is the credential. Requires headers PAYMENT-SIGNATURE or Payment-Authorization and optional Idempotency-Key.",
"params": {
"PAYMENT-SIGNATURE": {"type": "string", "required": false},
"Payment-Authorization": {"type": "string", "required": false},
"Idempotency-Key": {"type": "string", "required": false}
},
"response_format": "json",
"is_primary": true
}
],
"pricing_model": {
"type": "per_request",
"details": {
"get_api": "$0 identity handshake",
"create_mailbox": "$2.00 USD equivalent (x402/MPP)",
"read_draft": "$0",
"send_reply_forward": "$0.01 USD equivalent",
"currency": "USDC/USDT (Celo when enabled)",
"protocols": ["x402", "MPP (Payment-Authorization)"]
},
"free_tier": null,
"paid_tiers": []
},
"rate_limits": {"rpm": null, "tpm": null, "daily": null, "concurrent": null},
"capabilities": [
"email_inbox_creation",
"email_read",
"email_draft",
"email_send",
"email_reply",
"email_forward",
"x402_payments",
"mpp_payments",
"file_attachments",
"inline_cid_images",
"mcp_server"
],
"agent_readiness": {
"supports_x402": true,
"supports_streaming": false,
"has_sandbox": false,
"sdks": [],
"agent_auth_methods": ["wallet_auth", "public"]
}
}{
"tests": [
{
"name": "identity_handshake_unpaid_402",
"endpoint": "/api",
"method": "GET",
"headers": {},
"payload": null,
"expected_status": 402,
"intent": "auth",
"expected_behavior": "Unpaid GET /api returns 402 with PAYMENT-REQUIRED header containing base64 JSON with accepts[] and x402 metadata; Cache-Control: no-store. This is the correct paywall behavior.",
"metrics": ["latency", "status_code"],
"validation": {"header": "PAYMENT-REQUIRED", "type": "string", "min_length": 1}
},
{
"name": "identity_handshake_paid_200",
"endpoint": "/api",
"method": "GET",
"headers": {"PAYMENT-SIGNATURE": "<x402-identity-credential-for-$0>"},
"payload": null,
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Paid $0 identity handshake returns 200 JSON with service, api_base_url, agent_api_base_url, documentation_url, openapi_url, payment{protocol,currency,receiver}; PAYMENT-RESPONSE header present; Cache-Control: no-store.",
"metrics": ["latency", "accuracy", "status_code"],
"validation": {"field": "api_base_url", "type": "string", "min_length": 1}
},
{
"name": "create_mailbox_unpaid_402",
"endpoint": "/api/agent/v1/mailboxes",
"method": "POST",
"headers": {"Content-Type": "application/json"},
"payload": {"name": "bench-agent"},
"expected_status": 402,
"intent": "auth",
"expected_behavior": "Unpaid POST returns 402 with PAYMENT-REQUIRED header (x402 accepts[]) and optionally WWW-Authenticate for MPP; Cache-Control: no-store.",
"metrics": ["latency", "status_code"],
"validation": {"header": "PAYMENT-REQUIRED", "type": "string", "min_length": 1}
},
{
"name": "create_mailbox_paid_201",
"endpoint": "/api/agent/v1/mailboxes",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"PAYMENT-SIGNATURE": "<x402-$2-USDC-credential>",
"Idempotency-Key": "bench-create-mailbox-001"
},
"payload": {"name": "bench-agent-inbox"},
"expected_status": 201,
"intent": "happy_path",
"expected_behavior": "Paid mailbox create returns 201 JSON with id, public_id (uuid), workspace_id, email, name; PAYMENT-RESPONSE header; Cache-Control: no-store.",
"metrics": ["latency", "accuracy", "status_code"],
"validation": {"field": "public_id", "type": "string", "min_length": 1}
},
{
"name": "list_mailboxes_unpaid_402",
"endpoint": "/api/agent/v1/mailboxes",
"method": "GET",
"headers": {},
"payload": null,
"expected_status": 402,
"intent": "auth",
"expected_behavior": "Unpaid $0 identity route still requires an identity credential; returns 402 with PAYMENT-REQUIRED with amount 0 accepts.",
"metrics": ["latency", "status_code"],
"validation": {"header": "PAYMENT-REQUIRED", "type": "string", "min_length": 1}
},
{
"name": "list_mailboxes_identity_200",
"endpoint": "/api/agent/v1/mailboxes",
"method": "GET",
"headers": {"PAYMENT-SIGNATURE": "<x402-$0-identity-credential>"},
"payload": null,
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns array of mailbox objects each with id, public_id, workspace_id, email, name; PAYMENT-RESPONSE identity receipt; Cache-Control: no-store.",
"metrics": ["latency", "accuracy", "status_code"],
"validation": {"type": "array"}
},
{
"name": "list_emails_identity_200",
"endpoint": "/api/agent/v1/mailboxes/{mailboxId}/emails?limit=10&metadata_only=true",
"method": "GET",
"headers": {"PAYMENT-SIGNATURE": "<x402-$0-identity-credential>"},
"payload": null,
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns {emails: [...], totalCount: int}; each email has id, subject, sender, recipient, date. metadata_only should omit body/content_omitted semantics.",
"metrics": ["latency", "accuracy", "status_code"],
"validation": {"field": "emails", "type": "array"}
},
{
"name": "search_emails_identity_200",
"endpoint": "/api/agent/v1/mailboxes/{mailboxId}/search?query=benchmark&limit=5",
"method": "GET",
"headers": {"PAYMENT-SIGNATURE": "<x402-$0-identity-credential>"},
"payload": null,
"expected_status": 200,
"intent": "happy_path",
"expected_behavior": "Returns search result envelope {emails:[], totalCount:int}. Empty results are acceptable.",
"metrics": ["latency", "status_code"],
"validation": {"field": "totalCount", "type": "number"}
},
{
"name": "send_email_paid_202",
"endpoint": "/api/agent/v1/mailboxes/{mailboxId}/emails",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"PAYMENT-SIGNATURE": "<x402-$0.01-USDC-send-credential>",
0/13 tests passed
| Test | Endpoint | Status | Latency |
|---|---|---|---|
| identity_handshake_unpaid_402 | GET /api | 402 | 1172ms |
| identity_handshake_paid_200 | GET /api | 400 | 168ms |
| create_mailbox_unpaid_402 | POST /api/agent/v1/mailboxes | 402 | 336ms |
| create_mailbox_paid_201 | POST /api/agent/v1/mailboxes | 500 | 81ms |
| list_mailboxes_unpaid_402 | GET /api/agent/v1/mailboxes | 402 | 157ms |
| list_mailboxes_identity_200 | GET /api/agent/v1/mailboxes | 400 | 155ms |
| list_emails_identity_200 | GET /api/agent/v1/mailboxes/{mailboxId}/emails?limit=10&metadata_only=true | 400 | 217ms |
| search_emails_identity_200 | GET /api/agent/v1/mailboxes/{mailboxId}/search?query=benchmark&limit=5 | 400 | 159ms |
| send_email_paid_202 | POST /api/agent/v1/mailboxes/{mailboxId}/emails | 500 | 94ms |
| send_email_unpaid_402 | POST /api/agent/v1/mailboxes/{mailboxId}/emails | 402 | 180ms |
{"model": "openai", "data": {"overall": 33, "dimensions": {"token_efficiency": 4.0, "first_try_success": 4.0, "response_parseability": 6.0, "error_clarity": 5.0, "doc_quality": 5.0, "auth_simplicity": 4.0, "latency": 4.0, "consistency": 5.0}, "pricing_normalized": {"cost_per_1k_requests": null, "cost_per_1m_input_tokens": null, "cost_per_1m_output_tokens": null, "free_tier_requests": null, "estimated_monthly_cost_light": null, "estimated_monthly_cost_heavy": null}, "issues": [{"severity": "high", "detail": "Frequent errors related to payment processing and missing requirements", "endpoint": "/api/agent/v1/mailboxes"}, {"severity": "high", "detail": "Unexpected 500 errors in payment processing and sending emails", "endpoint": "/api/agent/v1/mailboxes/{mailboxId}/emails"}], "recommendations": ["Improve payment processing workflow to reduce errors", "Ensure error messages provide detailed guidance on how to rectify issues", "Optimize the API responses to be more consistent and informative", "Consider providing a clear documentation or examples for the auth process", "Investigate and resolve 500 errors occurring in the API"]}}Show your live agent-readiness score on your own site. Free, no auth — it updates as your score changes.
<a href="https://prowl.world/service/mermail">
<img src="https://prowl.world/badge/mermail.svg" height="56" alt="Agent-readiness on Prowl">
</a>
See operational metrics, LLM evaluations, agent readiness, and more.
Open in Dashboard