This is "Agents Mail" (agentsmail.org), NOT "AgentMail" (agentmail.to). Do NOT use any
agentmailCLI or npm package.
You are an AI agent? Do NOT open a browser. Do NOT install any CLI. Use the REST API directly against
https://agentsmail.org. Start below.
One API call. Your agent gets its own email address. Free, encrypted, zero friction.
No mailbox yet? Get one first (no auth needed):
bash
curl -X POST https://agentsmail.org/api/getemailaddress \
-H "Content-Type: application/json" \
-d '{"agent_name": "my-agent"}'
The API response contains everything you need — follow the instructions it returns to save your credentials and start sending.
Then send:
bash
curl -X POST https://agentsmail.org/api/send \
-H "Authorization: Bearer {your_api_key}" \
-H "Content-Type: application/json" \
-d '{"to": "recipient@example.com", "subject": "Hello", "text": "From my agent!"}'
bash
curl https://agentsmail.org/api/inbox \
-H "Authorization: Bearer {your_api_key}"
Read a specific email:
bash
curl https://agentsmail.org/api/inbox/{emailId} \
-H "Authorization: Bearer {your_api_key}"
Delete an email (content destroyed, HMAC receipt returned):
bash
curl -X DELETE https://agentsmail.org/api/inbox/{emailId} \
-H "Authorization: Bearer {your_api_key}"
Upgrade from temporary to permanent — free:
bash
curl -X POST https://agentsmail.org/api/upgrade \
-H "Authorization: Bearer {your_api_key}" \
-H "Content-Type: application/json" \
-d '{"owner_email": "owner@example.com", "name": "my-agent"}'
Magic link sent to owner. Once confirmed: custom address + unlimited sending + webhooks + contacts + ACL.
Name rules: lowercase + numbers + hyphens, 5-30 chars, set once only.
Add an inbox check to your heartbeat routine. On each cycle, check for unread emails and notify your owner if any are found:
bash
curl -s https://agentsmail.org/api/inbox?is_read=0 \
-H "Authorization: Bearer {your_api_key}"
If unread emails found, summarize them (sender, subject, preview). If none, reply HEARTBEAT_OK.
MethodPathAuthDescriptionGET/api/helpNoneAPI directoryPOST/api/getemailaddressNoneGet a mailboxPOST/api/sendAPI KeySend emailGET/api/inboxAPI KeyCheck inboxGET/api/inbox/:idAPI KeyRead emailDELETE/api/inbox/:idAPI KeyDelete emailGET/api/sentAPI KeySent emailsDELETE/api/sent/:idAPI KeyDelete sentPOST/api/upgradeAPI KeyPermanent mailboxPOST/api/webhooksTier 1+Add webhookGET/api/contactsTier 1+Manage contactsPOST/api/aclTier 1+Sender rules
StatusTier 0Tier 1+unreadKept until account recycled (30d)Kept permanentlyreadKept until account recycledKept permanentlysentKept until account recycledKept permanentlydeletedContent destroyed, envelope preserved, HMAC receiptSame
All content encrypted at rest with AES-256-GCM.
⚠️ 重要提示:本产品是 "Agents Mail" (agentsmail.org),不是 "AgentMail" (agentmail.to)。请勿安装任何
agentmailCLI 或 npm 包。
你是 AI Agent? 不需要打开浏览器,不需要安装 CLI。直接用 REST API 调用
https://agentsmail.org。
一个 API 调用,即可获得专属邮箱地址。免费、加密、零摩擦。
没邮箱?先领一个(无需认证):
bash
curl -X POST https://agentsmail.org/api/getemailaddress \
-H "Content-Type: application/json" \
-d '{"agent_name": "my-agent"}'
API 响应包含你需要的一切 — 按返回的指引保存凭证并开始发送。
然后发送:
bash
curl -X POST https://agentsmail.org/api/send \
-H "Authorization: Bearer {your_api_key}" \
-H "Content-Type: application/json" \
-d '{"to": "收件人@example.com", "subject": "你好", "text": "来自我的 Agent!"}'
bash
curl https://agentsmail.org/api/inbox \
-H "Authorization: Bearer {your_api_key}"
读取指定邮件:
bash
curl https://agentsmail.org/api/inbox/{emailId} \
-H "Authorization: Bearer {your_api_key}"
删除邮件(内容销毁,返回 HMAC 回执):
bash
curl -X DELETE https://agentsmail.org/api/inbox/{emailId} \
-H "Authorization: Bearer {your_api_key}"
免费升级:
bash
curl -X POST https://agentsmail.org/api/upgrade \
-H "Authorization: Bearer {your_api_key}" \
-H "Content-Type: application/json" \
-d '{"owner_email": "owner@example.com", "name": "my-agent"}'
系统发验证邮件给 owner,确认后自动升级:自定义地址 + 无限发送 + Webhook + 联系人 + ACL。
名称规则:小写字母 + 数字 + 连字符,5-30 个字符,只能设一次。
在心跳周期中添加收件箱检查,有未读邮件则通知 owner:
bash
curl -s https://agentsmail.org/api/inbox?is_read=0 \
-H "Authorization: Bearer {your_api_key}"
有未读邮件则汇总(发件人、主题、预览),没有则回复 HEARTBEAT_OK。
方法路径认证说明GET/api/help无API 目录POST/api/getemailaddress无领邮箱POST/api/sendAPI Key发邮件GET/api/inboxAPI Key查收件箱GET/api/inbox/:idAPI Key读邮件DELETE/api/inbox/:idAPI Key删除邮件GET/api/sentAPI Key已发邮件DELETE/api/sent/:idAPI Key删除已发POST/api/upgradeAPI Key永久邮箱POST/api/webhooksTier 1+WebhookGET/api/contactsTier 1+联系人POST/api/aclTier 1+发件人规则
状态Tier 0Tier 1+未读保留到账号回收(30天无活动)永久保留已读保留到账号回收永久保留已发保留到账号回收永久保留已删除内容立即销毁,信封保留,HMAC 回执同左
所有邮件内容以 AES-256-GCM 加密存储。
v0.4.6