# agmail > Email inboxes for AI agents: an address at agmail.shveik.dev for an hour, four hours or a day, receive only, with the verification code or link extracted from each message. Each purchase is paid in stablecoins: x402 on Base, Polygon and Solana or MPP on Base. No API keys, accounts or subscriptions. ## How a call is paid - POST the JSON body to the endpoint with no payment. The 402 answer carries the quote for exactly what you asked, in the `PAYMENT-REQUIRED` header (x402) and in a `WWW-Authenticate: Payment` challenge (MPP). Sign one and POST the same body again with `PAYMENT-SIGNATURE` (x402) or `Authorization: Payment` (MPP). Every endpoint answers on `/x402/` and on `/mpp/`; both protocols are accepted on both. - The payment settles only after the call is accepted. A call that cannot be served (a name that is taken, sold out, an extension of an unknown inbox) is not charged. Retrying with the same payment returns the stored answer, without the secret. - Errors the service itself produces are JSON. A request body over 64 KiB is refused (413). ## Get an inbox - POST `/x402/inbox-1h`, `/x402/inbox-4h` or `/x402/inbox-24h` (or the same under `/mpp/`) with `{"name":"acme42"}`. The name is optional (3 to 32 characters: letters, digits, dots, dashes, underscores; a random one is made if you leave it out). Check a name for free with `GET /v1/names/{name}`. A name that is taken is refused with 409 before you pay. - The answer is one JSON object: `inbox_id`, `address`, `secret`, `expires_at`, `plan` and `msg_cap`. Keep the secret: it is shown only in this answer. The inbox takes mail once the payment has settled (a minute or so); its time runs from then. - Send the secret as `Authorization: Bearer ` to the inbox's free API: `GET /v1/inbox/{id}` (state, expiry, counters), `GET /v1/inbox/{id}/messages?after=`, `GET /v1/inbox/{id}/messages/{mid}`, `DELETE /v1/inbox/{id}/messages/{mid}`, `DELETE /v1/inbox/{id}`. - `GET /v1/inbox/{id}/wait?timeout=30&after=&from=&subject_contains=` blocks until a matching message arrives (1 to 55 seconds) and returns it with `text`, `codes` and `links`; 204 on timeout. `GET /v1/inbox/{id}/otp` waits for a message that carries a code or a verification link and returns `code` and `link`. - Mail is received only; nothing can be sent. Attachments are listed (name, type, size) but not kept. Links are returned as text and never fetched. ## Extend an inbox - POST `/x402/inbox-1h-renew`, `/x402/inbox-4h-renew` or `/x402/inbox-24h-renew` (or under `/mpp/`) with `{"inbox_id":"ib_0123456789ab","secret":"agm_..."}` (the secret goes in the body because MPP uses the Authorization header for its payment). An inbox cannot be paid for more than 72 hours ahead. An inbox that ran out keeps its address and mail for one more hour and can be extended in that time. - An inbox that is not extended stops taking mail at its expiry; its mail is deleted shortly after and the name is free again. ## Limits - When the service is at its capacity the quote answer carries a plain reason (sold out right now) instead of a price you should sign, and a payment sent anyway is refused before it settles; try again later. - Messages are limited per inbox in number and size; a full inbox makes senders retry later. Use the inboxes within the rules of the services you sign up to, and not for spam, fraud or abuse: inboxes used that way are removed without a refund. See `/privacy`, `/terms` and `/abuse`. ## Try also agdata - Need data for your agent: pages as Markdown, search, social, maps, news and jobs? agdata does that, paid the same way. Site: https://agdata.shveik.dev, docs: https://agdata.shveik.dev/llms.txt ## Endpoints - [POST /x402/inbox-1h](https://agmail.shveik.dev/x402/inbox-1h): Inbox for one hour. Example body: `{"name":"acme42"}` - [POST /x402/inbox-1h-renew](https://agmail.shveik.dev/x402/inbox-1h-renew): Extend by one hour. Example body: `{"inbox_id":"ib_0123456789ab","secret":"agm_0123456789abcdef0123456789abcdef"}` - [POST /x402/inbox-4h](https://agmail.shveik.dev/x402/inbox-4h): Inbox for four hours. Example body: `{"name":"acme42"}` - [POST /x402/inbox-4h-renew](https://agmail.shveik.dev/x402/inbox-4h-renew): Extend by four hours. Example body: `{"inbox_id":"ib_0123456789ab","secret":"agm_0123456789abcdef0123456789abcdef"}` - [POST /x402/inbox-24h](https://agmail.shveik.dev/x402/inbox-24h): Inbox for a day. Example body: `{"name":"acme42"}` - [POST /x402/inbox-24h-renew](https://agmail.shveik.dev/x402/inbox-24h-renew): Extend by 24 hours. Example body: `{"inbox_id":"ib_0123456789ab","secret":"agm_0123456789abcdef0123456789abcdef"}` ## Machine-readable - [OpenAPI 3.1](https://agmail.shveik.dev/openapi.json): full request schemas and x-payment-info - [x402 manifest](https://agmail.shveik.dev/.well-known/x402) - [MCP server](https://agmail.shveik.dev/mcp): create_inbox and extend_inbox (paid with x402 inside the tool call), and free tools to wait for mail, read it and get the code - [Health](https://agmail.shveik.dev/health) ## Feedback - Free, no payment: POST `https://agmail.shveik.dev/feedback` (or the MCP tool `feedback`) with `{"message":"what you want to tell us","kind":"bug|idea|praise|other","route":"optional route name","contact":"optional"}`. `message` is required (2000 characters at most); `route` is one of the routes above. A person reads it. Please say what worked, what failed (the route, what you sent, what came back) and what you miss; send no secrets or private data. Limited to a few messages an hour per caller.