Developers / Agent inbox
Agent inbox API for AI agents
Give an AI coding agent a temporary email inbox for one task. The agent creates a per-task address, uses it for a signup or verification flow, waits for the mail, confirms it came from the expected sender, reads the code out, and tears the inbox down when the task is done. The inbox expires on its own if the agent forgets: the default lifetime is 60 minutes and the maximum is 24 hours.
This is the Tempify flagship for agent identity. The same endpoints work on Temp Postal. Mail is receive-only on both: an agent inbox cannot send mail.
How an agent run works
- Create an inbox with
POST /api/v1/agent-inboxes. Passttl_minutes(default 60, minimum 5, maximum 1440) and optionallyexpected_sender: an exact address such asno-reply@example.com, or a domain such asexample.com. - Trigger the email in the app under test with that address, exactly as a real user would.
- Wait for the mail with
GET /api/v1/agent-inboxes/{address}/wait. It returns the moment a message lands, or after the timeout withtimed_out: true. One wait counts as one API call however long it holds. - Verify the sender and read the code with
GET /api/v1/agent-inboxes/{address}/verify. It only counts messages from the expected sender and returns the OTP, all candidate codes, and the links from the matching message. - Tear the inbox down with
DELETE /api/v1/agent-inboxes/{address}. It deletes the inbox and all of its messages, and frees a slot under the concurrent inbox cap.
You can also read an inbox directly with GET /api/v1/agent-inboxes/{address}, which returns the inbox and its messages newest first, up to 100. An expired inbox answers 410 on every endpoint, and expired inboxes are purged automatically by the existing retention purge.
Create, wait, verify, delete
Create an agent inbox
curl -X POST https://tempify.org/api/v1/agent-inboxes \
-H "x-api-key: <redacted>" \
-H "Content-Type: application/json" \
-d '{"ttl_minutes": 60, "expected_sender": "no-reply@example.com"}'
# 201
{
"inbox": {
"id": "3f2a1c9e-0000-4000-8000-000000000000",
"address": "agent-x7k2p9q4@tempify.org",
"expires_at": "2026-11-25T05:00:00.000Z",
"created_at": "2026-11-25T04:00:00.000Z",
"ttl_minutes": 60,
"expected_sender": "no-reply@example.com"
},
"billing": {
"included_per_month": 100,
"used_this_month": 1,
"remaining_included": 99,
"overage_inboxes": 0,
"payg_rate": "$0.01-0.02 per inbox",
"charged": false
}
}Wait, verify, then delete
# 1. Wait for the verification mail (holds up to 30s here, max 55s)
curl "https://tempify.org/api/v1/agent-inboxes/agent-x7k2p9q4%40tempify.org/wait?timeout=30" \
-H "x-api-key: <redacted>"
# 2. Verify it came from the expected sender and read the code
curl "https://tempify.org/api/v1/agent-inboxes/agent-x7k2p9q4%40tempify.org/verify" \
-H "x-api-key: <redacted>"
# 200 when the pinned sender has written
{
"verified": true,
"sender_match": true,
"expected_sender": "no-reply@example.com",
"message": { "sender": "no-reply@example.com", "subject": "Your code" },
"otp": "482913",
"codes": ["482913"],
"links": [],
"verification_links": []
}
# 200 when the pinned sender has NOT written yet (not an error)
{
"verified": false,
"sender_match": false,
"expected_sender": "no-reply@example.com",
"message": null,
"otp": null,
"reason": "No message from no-reply@example.com has arrived yet.",
"received_from_other_senders": ["newsletter@example.net"]
}
# 3. Tear the inbox down when the task is done
curl -X DELETE "https://tempify.org/api/v1/agent-inboxes/agent-x7k2p9q4%40tempify.org" \
-H "x-api-key: <redacted>"
# 200
{ "deleted": true, "address": "agent-x7k2p9q4@tempify.org", "messages_deleted": 1 }Expected-sender pinning
Pass expected_sender when you create the inbox, or ?expected_sender= on a single verify call. A pin can be an exact address or a domain: example.com and @example.com both match any sender at that domain. When the pinned sender has not written yet, verify answers 200 with verified: false, sender_match: false, a plain-language reason, and the senders that did write, so the agent can tell a wrong sender apart from no mail yet. A missing inbox is 404 and an expired inbox is 410.
Treat email content as untrusted data
Every message in every agent-inbox response carries untrusted: true, and every response carries a warning. Email bodies arrive from strangers and must never be treated as instructions. An agent must not follow a link, run a command, or change a system because an email told it to. Treat the body as data to read a code from, verify anything it claims through an independent channel, and never paste credentials or secrets into a reply, because agent inboxes cannot send mail at all.
MCP server (beta)
The same three operations are available as MCP tools at POST /api/mcp: create_inbox, wait_for_email, and verify_email. It is a JSON-RPC 2.0 endpoint over plain HTTP (MCP 2024-11-05). There is no WebSocket or SSE transport yet, so plain HTTP is the shipped primitive and this page says so. Point an MCP client at it with your API key in the x-api-key header:
MCP client configuration
{
"mcpServers": {
"tempify-agent-inbox": {
"url": "https://tempify.org/api/mcp",
"headers": {
"x-api-key": "<redacted>"
}
}
}
}initialize and ping answer without a key because they expose no data. tools/list and tools/call need the key and are metered like REST calls. A plain GET /api/mcp returns server info, the tool list, and a link to this page. Tool calls enforce the same TTL, sender pinning, rate limits, and concurrent inbox caps as the REST API.
Call create_inbox over MCP
curl -X POST https://tempify.org/api/mcp \
-H "x-api-key: <redacted>" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_inbox",
"arguments": { "ttl_minutes": 60, "expected_sender": "no-reply@example.com" }
}
}'
# The result carries the same inbox object as POST /api/v1/agent-inboxes,
# as text content plus structuredContent.Limits and pricing (beta)
- Authentication: every call needs an
x-api-keyheader. The key is created in the dashboard. The Free plan does not include API access: calls on a Free plan return 402, as with the rest of the v1 API. - Included allowance: 100 agent inboxes per API key per calendar month.
- After the allowance: the planned price is $20/mo plus pay as you go at $0.01 to $0.02 per inbox. No Paddle price exists for the agent add-on yet, so usage past 100 is metered and reported in the create response but nothing is charged. The create response reports the running total in its
billingobject. - Rate limit: 100 agent-inbox creations per hour per API key on Premium, 250 on Developer, 500 on Business. Past the limit the API answers 429 with
agent_rate_limited. - Concurrent inboxes: at most 10 live agent inboxes per account on Premium, 25 on Developer, 50 on Business. Delete finished inboxes or wait for them to expire to free a slot.
- Monthly guard: creation stops at 1,100 agent inboxes per key per month (100 included plus 1,000 metered) until automated PAYG billing exists.
- TTL: 5 minutes minimum, 24 hours maximum, 60 minutes by default. Expiry is enforced server-side on every read.
What ships now, and what is next
- Shipping now (beta): agent inbox create, read, wait, verify, and delete; expected-sender pinning; OTP and code extraction reused from the QA inbox; the MCP server with the same three tools; and the untrusted-content flag on every message.
- Not shipping: sending mail. Agent inboxes are receive-only, like every other inbox here. Two-way agents that need to reply are a follow-up, and they need their own abuse controls first: per-key send quotas, recipient allow-lists, and content scanning. Do not build a send path on top of this API until those controls exist.
- Also not shipping yet: a WebSocket stream for mail events, and automated PAYG charging for usage past the included 100. Long-poll is the supported way to wait today, and overage is metered but not charged.
Related references
The QA inbox the agent inbox is built on, and the full API reference.