Send. Receive.
Stay in control.
Create your Mail account with your email address, or sign in if you already have one. No existing AGNT account or app subscription is required. Mail keys have only read and/or send access; they cannot purchase credit or create more keys.
Open your account →Headless signup (agents)
No email, no browser. The secret is your identity.
POST https://mail.agnt.gg/mail/v1/agents
Content-Type: application/json
{"name":"my-agent"}
→ 201 { "agentId": "agt_…", "secret": "mail_…", "balance": 0,
"fund": { "claimUrl": "https://mail.agnt.gg/claim/agt_…", "x402": "POST /mail/v1/funding/x402" } }Share the funding link with the person paying for the agent. They can create a Mail account with any email address; no AGNT app subscription is needed. After they fund hosting, GET /mail/v1/agents/AGENT_ID/claim returns hostingActive: true once hosting is paid; a funded balance alone does not create a mailbox. Machine-readable: llms.txt · openapi.json.
Agents pay for themselves with x402
An agent can fund its own account without a browser, a card, or a human: request a funding order, pay the returned x402 requirements in USDC on Base, and the credit lands on the same balance cards use. Settlement runs through the Coinbase x402 facilitator and is recorded as a Stripe payment. This exact flow is live and proven end to end.
The 20-line client (JavaScript)
// pay.mjs — an agent funding its own AGNT Mail account (this exact flow is proven live)
// npm i @x402/fetch @x402/evm @x402/core viem
import { privateKeyToAccount } from 'viem/accounts';
import { x402Client } from '@x402/core/client';
import { registerExactEvmScheme } from '@x402/evm/exact/client';
import { wrapFetchWithPayment } from '@x402/fetch';
const auth = { Authorization: 'Bearer ' + process.env.MAIL_SECRET, 'Content-Type': 'application/json' };
const wallet = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY); // holds USDC on Base; no ETH needed
// 1. Create a funding order → HTTP 402 with x402 requirements
const created = await fetch('https://mail.agnt.gg/mail/v1/funding/x402', { method: 'POST', headers: auth, body: JSON.stringify({ amountCents: 1000 }) });
const order = await created.json(); // { orderId, state: 'awaiting_payment', requirements }
// 2. Let the x402 client sign and pay. The default spend cap is $1 — raise it or every order is refused.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: '$50' });
registerExactEvmScheme(client, { signer: wallet, networks: ['eip155:8453'] });
const paidFetch = wrapFetchWithPayment(fetch, client);
const paid = await paidFetch('https://mail.agnt.gg/mail/v1/funding/x402/' + order.orderId, { method: 'POST', headers: auth, body: '{}' });
const result = await paid.json(); // { state: 'credited', transactionId: '0x…', paymentIntent: 'pi_…' }
// 3. Spend the credit: buy a plan, make an inbox, send mail
await fetch('https://mail.agnt.gg/mail/v1/hosting/purchase', { method: 'POST', headers: { ...auth, 'Idempotency-Key': order.orderId }, body: JSON.stringify({ plan: 'starter' }) });
await fetch('https://mail.agnt.gg/mail/v1/inboxes', { method: 'POST', headers: auth, body: JSON.stringify({ name: 'my-agent' }) });
Two things that will bite you
- Spend cap.
@x402/fetchrefuses any payment over $1 by default. Every Mail order is $10 or more, so callsetSpendControls({ maxAmountPerPayment: '$50' })or the payment silently fails with a confusing error. - Your wallet needs USDC on Base and nothing else. The facilitator pays the gas, so you do not need ETH. Easiest way to fund it: Coinbase app → Send → USDC → network Base.
Under the hood (any language)
# Any language. 1) Create the order:
curl -X POST https://mail.agnt.gg/mail/v1/funding/x402 \
-H 'Authorization: Bearer mail_…' -H 'Content-Type: application/json' -d '{"amountCents":1000}'
# → 402. Body: { orderId, state:"awaiting_payment", expiresAt, requirements }
# requirements.accepts[0] = { scheme:"exact", network:"eip155:8453", amount:"10000000",
# asset:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", # USDC on Base, 6 decimals
# payTo:"0x78f1cc529d1de14de8c4b569c25308beb2de87d3", maxTimeoutSeconds:600,
# extra:{ name:"USD Coin", version:"2" } } # EIP-712 domain for the signature
# 2) Sign an EIP-3009 transferWithAuthorization for exactly payTo/amount/asset on chain 8453,
# wrap it in an x402 v2 payment payload, base64 it, and POST it back:
curl -X POST https://mail.agnt.gg/mail/v1/funding/x402/ORDER_ID \
-H 'Authorization: Bearer mail_…' -H 'PAYMENT-SIGNATURE: <base64 payload>'
# → 200 { state:"credited", transactionId:"0x…", paymentIntent:"pi_…" } + PAYMENT-RESPONSE header
# → 400 { error, reason, detail } if the wallet lacks USDC, the amount/destination is wrong, or it expired
# 3) Status any time (402 while awaiting, 200 once credited or expired). Retry the SAME order after a timeout.
curl https://mail.agnt.gg/mail/v1/funding/x402/ORDER_ID -H 'Authorization: Bearer mail_…'
Amounts: 1000, 2500 or 5000 cents. Orders expire after 10 minutes; a settled transaction can never be replayed onto another order, and a wrong amount, destination or expired authorization returns 400 without charging. The agent key from headless signup already has the scope this needs. Network eip155:8453 (Base), asset USDC, protocol x402 v2. Compatible with @x402/fetch, Stripe purl, and any v2 client. Card and wallet Checkout remain available for humans.
Create your Mail account
- Enter your email on the account page and request a verification code. A new Mail account is created when you verify it.
- Add prepaid credit through Stripe ($10 minimum top-up).
- Activate one month of hosting for $5 from your balance, then create your mailbox. Use View email for webmail, or create a scoped key for your agent.
- Use that key in the Authorization header. Keep it secret.
Card and supported stablecoin payments are available through Stripe Checkout, and agents can fund headlessly with USDC on Base over x402 (below). Existing prepaid credit can activate standalone hosting; eligible paid AGNT accounts include hosting.
Read mail
GET https://mail.agnt.gg/mail/v1/inboxes Authorization: Bearer YOUR_MAIL_KEY GET /mail/v1/inboxes/INBOX_ID/messages GET /mail/v1/inboxes/INBOX_ID/messages/MESSAGE_ID GET /mail/v1/inboxes/INBOX_ID/messages/MESSAGE_ID/attachments/INDEX
Use nextCursor to page results. Message bodies return plain text; attachments can be downloaded through the scoped attachment endpoint. Inbound messages are durable before acceptance.
Activate standalone hosting
GET /mail/v1/usage
POST /mail/v1/hosting/purchase
Idempotency-Key: YOUR_UNIQUE_OPERATION_ID
Authorization: Bearer YOUR_OWNER_OR_MANAGE_KEY
PUT /mail/v1/hosting/preferences
{"autoRenew":false,"allowOverage":false}Hosting activation deducts $5 from your existing prepaid balance, not your card. Included units reset monthly, purchased credit does not. Lapsed hosting blocks new mail but keeps existing mail readable.
Send mail with attachments
Attach up to 10 files totaling 5 MiB. Use an attachments array with filename, contentType and base64 content. Executable/script file types are rejected. Incoming messages may be up to 10 MiB encoded.
"attachments": [{
"filename": "invoice.pdf",
"contentType": "application/pdf",
"content": "BASE64_FILE_BYTES"
}]POST https://mail.agnt.gg/mail/v1/inboxes/INBOX_ID/messages
Authorization: Bearer YOUR_MAIL_KEY
Idempotency-Key: YOUR_UNIQUE_OPERATION_ID
Content-Type: application/json
{
"to": "recipient@example.com",
"subject": "Your requested update",
"text": "Here is the update you requested."
}One recipient per request. Reuse the same idempotency key and same content when retrying. A different payload with the same key is rejected. A queued response is not proof of delivery.
GET /mail/v1/deliveries/DELIVERY_ID
States: queued, submitting, uncertain, accepted_remote, accepted_local, rejected. Uncertain delivery remains reserved and is never automatically sent twice. Accepted_remote means the destination server accepted it—not guaranteed inbox placement. Accepted_local means stored in another mailbox on this service.
Hosting and limits
- 1, 5 or 15 mailboxes according to plan; no separate daily sending quota.
- 250 MB, 1 GB or 3 GB pooled retained incoming mail by plan; no automatic message deletion.
- 10 MiB encoded message limit; up to 10 outgoing attachments totaling 5 MiB. Plain-text and HTML bodies up to 100 KB each.
- Starter includes 1,000 units for $5/month, Pro 5,000 for $15/month, Business 20,000 for $39/month. Hosting is paid from credit. Extra units cost $1 per 1,000 only with opt-in overage. Retries and rejected delivery are not extra units.
- Pay by card or stablecoin wallet through Stripe Checkout, or let the agent pay for itself over x402 (see the section above). Automatic notifications are available in your account.
Do not use for unsolicited bulk mail or purchased recipient lists. Receiving providers can reject messages or put them in Spam despite passing authentication.
Standalone Mail plans
| Plan | Monthly hosting | Inboxes | Emails sent + received per month | Pooled storage |
|---|---|---|---|---|
| Starter | $5 | 1 | 1,000 | 250 MB |
| Pro | $15 | 5 | 5,000 | 1 GB |
| Business | $39 | 15 | 20,000 | 3 GB |
Per account, shared across inboxes. One accepted outgoing recipient or stored incoming copy is one unit. Reads are free. No separate daily sending quota. Monthly units reset on day 1 UTC. Hosting is prepaid from credit; optional renewal never charges a card automatically. Upgrades cost the full monthly price difference and retain the existing expiry; lower plans can be selected after expiry. No mail is deleted on expiry or downgrade.
Automatic email notifications
In your account, open Automatic notifications and register a public HTTPS endpoint. We send signed delivery.accepted, delivery.failed and message.received events. Recipient-server acceptance does not prove inbox placement. Received events identify the inbox; fetch messages with your authorized API key.
GET /mail/v1/webhooks
POST /mail/v1/webhooks {"url":"https://your-app.example/events"}
DELETE /mail/v1/webhooks/ENDPOINT_ID
GET /mail/v1/notifications?after=0
GET /mail/v1/webhook-deliveries
POST /mail/v1/webhook-replay {"eventId":"EVENT_ID","endpointId":"ENDPOINT_ID"}Owner authentication required. Save the signing secret returned on creation. Verify HMAC-SHA256 over the timestamp, a period, and the exact raw JSON body. Headers: X-AGNT-Timestamp, X-AGNT-Signature (v1=hex), X-AGNT-Event-ID. Reject stale timestamps and deduplicate event IDs. Delivery is at least once, with up to 12 attempts and bounded backoff. Public HTTPS/IPv4 endpoints on port 443 are supported; redirects and private networks are rejected.
Already subscribe to AGNT?
Paid AGNT includes Mail by plan: Personal includes Starter (1 inbox, 1,000 emails sent + received/month, 250 MB); Always-On includes Pro (5 inboxes, 5,000 emails/month, 1 GB); Business and Enterprise include Business (15 inboxes, 20,000 emails/month, 3 GB). Limits are pooled per account. Purchased credit and current-month usage are preserved; higher active paid Mail allowances remain available.