How to give an AI agent its own email address
Create an inbox, get told when mail arrives and reply in the same thread. Each step comes with the request to copy.
An ACK inbox is a mailbox that belongs to your agent. It has its own address, it receives mail, and whatever the agent sends comes from that address. This guide sets one up with curl. The same requests work from any language that can make an HTTP call.
Make an API key
Sign up, then create a key under API keys. A key can cover the whole organisation, one pod of inboxes or a single inbox. The secret is shown once, so put it in your secrets manager before you leave the page.
export ACK_API_KEY=ack_live_…Create an inbox
Send a username. On the trial, addresses end in @trial.ack.now. Once you've added your own domain, send domain as well.
curl https://api.ack.now/v0/inboxes \
-H "Authorization: Bearer $ACK_API_KEY" \
--json '{"username": "support-agent"}'
# {"inbox_id": "support-agent@trial.ack.now", …}curl https://api.ack.now/v0/inboxes \
-H "Authorization: Bearer $ACK…" \
--json '{"username": "support-agent"}'
# {"inbox_id": "support-agent@…"}The inbox ID is the address, and it can receive mail as soon as the request returns. During the trial you can send 100 emails in total. Receiving is unlimited.
- From
- Dana Ruiz <dana@northwind.co>
- To
- support-agent@trial.ack.now
- Subject
- Invoice 4471 charged twice
Hi, I see two charges for invoice 4471 on my card this morning. Can you refund one?
- From
- support-agent@trial.ack.now
- To
- dana@northwind.co
- Subject
- Re: Invoice 4471 charged twice
Found the duplicate and refunded it. You'll see it in 3–5 days.
Hear about new mail
Register a webhook and ACK sends a POST to your URL when mail arrives. The URL has to be https and reachable from the public internet. The response includes a signing secret, which you use to check that a request really came from ACK.
curl https://api.ack.now/v0/webhooks \
-H "Authorization: Bearer $ACK_API_KEY" \
--json '{"url": "https://example.com/hooks/ack",
"event_types": ["message.received"]}'
# {"webhook_id": "whk_…", "secret": "whsec_…", …}POST /v0/webhooks
{"url": "https://example.com/hooks/ack",
"event_types": ["message.received"]}Each delivery carries the whole message, with the sender, subject, text and HTML bodies and a list of attachments, plus the thread it belongs to. How to receive email with webhooks has the code for checking the signature.
Mail that fails spam checks is sent as message.received.spam instead. If you only subscribe to message.received, your agent won't see spam, so it won't answer any.
Reply in the thread
Take the message_id from the webhook and send the reply. ACK sets the In-Reply-To and References headers, so the reply shows up in the same conversation in the sender's mail app.
curl https://api.ack.now/v0/inboxes/support-agent@trial.ack.now\
/messages/$MESSAGE_ID/reply \
-H "Authorization: Bearer $ACK_API_KEY" \
--json '{"text": "Found the duplicate charge and refunded it."}'POST /v0/inboxes/{inbox_id}
/messages/{message_id}/reply
{"text": "Found the duplicate…"}If you're not ready to let the agent send on its own, have it save a draft and let someone on your team send it. Approve your agent's email before it goes out shows how.
Or use MCP
If your agent runs in a client that supports MCP, you can skip the code above. Add ACK's server with the same key and the agent gets 39 tools for reading, sending and drafting mail.
{
"mcpServers": {
"ack": {
"url": "https://mcp.ack.now/mcp",
"headers": { "x-api-key": "ack_live_…" }
}
}
}{"mcpServers": {"ack": {
"url": "https://mcp.ack.now/mcp",
"headers": {
"x-api-key": "ack_live_…"
}
}}}Add an email MCP server to your agent covers the setup, including how to keep an agent to its own inbox.