For agents
Email for AI agents, set up by the agent.
Transactional and broadcast email, like Resend, at cost. No API key to paste and no dashboard to sign up in: your agent generates a key, and its first request creates the account.
Read https://sendforai.com/llms.txt and set up email sending for this project with SendForAI.Sandbox
Start in 60 seconds, no domain
A sandbox identity is derived from the agent's own key, so there is nothing to verify. It can use the whole API against the simulator: delivered@, bounced@ and complained@simulator.sendforai.com produce those events. Real mail needs a domain you control.
# 1. Create a key and a sandbox identity. No domain, no DNS, no signup.
npx sendforai sandbox
# 2. Mint a connection token for plain HTTP and the hosted MCP server.
TOKEN=$(npx sendforai token | jq -r .token)
# 3. Send to the simulator. Nothing is delivered, nothing is billed.
curl https://api.sendforai.com/v1/emails \
-H "Authorization: Bearer $TOKEN" \
-H "content-type: application/json" \
-d '{
"from": "agent@<your sandbox identity>",
"to": "delivered@simulator.sendforai.com",
"subject": "Hello",
"markdown": "It works."
}'The CLI prints JSON and never prompts, so an agent can run it unattended. When you have a domain, npx sendforai dns setup publishes the records with a Vercel or Cloudflare token. The token never leaves the agent's machine.
Install
Connect it to your agent
The hosted MCP server is at https://sendforai.com/mcp (Streamable HTTP). It authenticates with a connection token that you mint locally with npx sendforai token. Tokens last up to 90 days and nothing is stored server-side.
Claude Code
One command adds the hosted server.
claude mcp add --transport http sendforai https://sendforai.com/mcp \
--header "Authorization: Bearer <token>"Cursor and other mcp.json clients
In .cursor/mcp.json, or any client that takes a URL and headers.
{
"mcpServers": {
"sendforai": {
"url": "https://sendforai.com/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}VS Code Copilot
In .vscode/mcp.json.
{
"servers": {
"sendforai": {
"type": "http",
"url": "https://sendforai.com/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}Local server (stdio)
For clients that only accept OAuth for remote servers, or when you want the key to stay in a local process.
{
"mcpServers": {
"sendforai": {
"command": "npx",
"args": ["-y", "@sendforai/mcp"],
"env": {
"SENDFORAI_DOMAIN": "example.com",
"SENDFORAI_PRIVATE_KEY_FILE": "/path/to/private-key.pem"
}
}
}
}CLI
JSON output, never prompts.
npx sendforai sandbox # key + sandbox identity, no DNS
npx sendforai dns setup # publish DNS with a Vercel or Cloudflare token
npx sendforai token # mint a connection token (up to 90 days)Plain HTTP, any language
A connection token works as a bearer header. Node has an SDK: npm i @sendforai/sdk.
curl https://api.sendforai.com/v1/account \
-H "Authorization: Bearer $TOKEN"Human in the loop
What a human still has to do
Every human step is a place an agent stops and waits. Here are ours, next to what Resend's documentation said on November 12, 2026.
| SendForAI | Resend | |
|---|---|---|
| Account creation | No human step. The agent generates an Ed25519 key and the first authenticated request creates the account. There is no dashboard signup. | Human. Resend's AI onboarding page says: "A human must create the Resend account." |
| API key | None issued. The agent signs requests with its own key, or mints a connection token locally from that key. | An API key is the prerequisite on Resend's AI onboarding page. |
| DNS | None to start: a sandbox identity needs no domain. For real mail, the agent publishes the records itself if it has a Vercel or Cloudflare token; otherwise someone adds them at the DNS provider. | Records must be added at the DNS provider. The same page says: "You may find it easier to verify your domain in the dashboard." |
| Payment | Human, once the agent needs to email the outside world: the agent returns a top-up checkout link (minimum $10) and a person pays it. Building and simulated sends cost $0. | Not compared here. |
| Approving broadcasts | Human, by design: a broadcast waits until a person opens its approval link. | Not compared here. |
Resend column read on November 12, 2026 from resend.com/docs/ai-onboarding. "Not compared here" means that page didn't state it, so we left it out rather than guess. Resend is ahead in places: per resend.com/docs on the same date, it offers a hosted MCP server with OAuth, a CLI, agent skills and plugins, and receiving and inbox features that SendForAI does not have.
Responses
What your agent gets back
Every response carries its cost. dry_run plans a send without sending it, max_cost_usd refuses anything over a cap, and every error has a fix the agent can act on.
A dry run
The cost, the recipients and lint warnings, with nothing sent.
POST /v1/emails { ..., "dry_run": true, "max_cost_usd": 0.01 }
{
"id": null,
"dry_run": true,
"status": "planned",
"recipients": [{ "to": "ana@example.com", "status": "accepted" }],
"cost": {
"emails": 1,
"ses_usd": 0.0001,
"billed_usd": 0,
"included_remaining": 8799,
"note": "Included in this sending month. 8799 of 10000 included emails remain this month."
},
"lint": [],
"receipt": null
}An error
What happened, and the next step in words a model can follow.
HTTP 409
{
"error": {
"code": "sandbox_identity",
"message": "k3f9c….sandbox.sendforai.com is a sandbox identity, which can only send to addresses @simulator.sendforai.com.",
"fix": "To send real email, add a domain you control to this account: publish TXT _sendforai.<your domain> ... With a Vercel or Cloudflare token, sfa.dns.setup({ domain }) (MCP: setup_dns, CLI: sendforai dns setup) does all of it.",
"details": { "simulator": "delivered@simulator.sendforai.com" }
}
}Events are pullable, so the agent needs no webhook endpoint. Broadcasts wait for a human approval link. Spend comes from a prepaid balance with a monthly budget only a human can raise: $0 to build, $5 in months you send (10,000 emails included), then $0.11 per 1,000. Full pricing.
Limits
What SendForAI doesn't do
- No inbound email. It is send-only: no receiving and no inbox for your agent.
- One SDK. The SDK is for Node. Other languages use plain HTTP with a connection token.
- New domains warm up. A new sending domain starts with a daily cap that rises as it builds reputation.
- No OAuth on the hosted MCP server. It uses bearer tokens, so clients that only support OAuth connectors need the local server.
- Real mail needs a domain. A sandbox identity can only reach the simulator.
- Two things always need a person. Paying a top-up checkout link, and approving a broadcast.
Choosing between an inbox API and a sending API? Read what an AI agent needs from an email sending API, with the questions to ask any provider.
Machine readable
Endpoints your agent can read
| Endpoint | What it is |
|---|---|
| /llms.txt | Short index of the product, pricing, endpoints and guides. |
| /llms-full.txt | The same, with the full documentation inline. |
| /docs.md | The docs as Markdown, including the signing recipe and the sandbox. |
| /pricing.md | Pricing as Markdown. |
| /openapi.json | OpenAPI description of the HTTP API. |
| /.well-known/mcp.json | MCP server manifest. |
| /skill.md | An agent skill that teaches setup and sending. |
| GET /v1 | API index: where the docs, MCP server, CLI and SDK are. |
| GET /v1/pricing | Pricing as JSON. |
| GET /v1/status | Service status as JSON. |
Email for AI agents FAQ
Can an AI agent sign up for an email API without a human?
With SendForAI, yes. There is no dashboard signup and no API key to copy. The agent generates an Ed25519 key, and the first authenticated request creates the account. A person is only needed later, to pay a top-up checkout link before the agent emails anyone outside the simulator and your own domains, and to approve broadcasts.
Does my agent need a domain to start?
No. Running npx sendforai sandbox creates a sandbox identity derived from the agent's key. It can use the whole API against the simulator: delivered@, bounced@ and complained@simulator.sendforai.com produce those events without delivering or billing anything. Real mail needs a domain you control.
How do I connect SendForAI to Claude Code, Cursor or VS Code?
Add the hosted MCP server at https://sendforai.com/mcp (Streamable HTTP) with an Authorization: Bearer header carrying a connection token. Mint the token locally with npx sendforai token. If your client only supports OAuth connectors, run the local server instead: npx -y @sendforai/mcp.
What is a connection token, and is it an API key?
It is a bearer credential the agent signs on its own machine with its identity key. SendForAI does not issue it and stores nothing server-side. A token lasts up to 90 days and expires on its own. Use it wherever signing each request is awkward: the hosted MCP server, curl, or any language without the SDK.
How do I stop an agent from overspending?
Three limits. max_cost_usd caps a single request. dry_run returns the cost before anything is sent. And the account runs on a prepaid balance with a monthly budget that only a human can raise. Pricing is $0 to build, $5 in months you send (10,000 emails included), then $0.11 per 1,000.
Can an agent receive email with SendForAI?
No. SendForAI is send-only: there is no inbound mail and no inbox. Delivery, bounce and complaint events are pullable from the API, so no webhook endpoint is needed. If your agent needs its own inbox, use a provider with receiving, such as Resend.
Updated November 12, 2026. Spot an error? hello@sendforai.com.