Skip to Content
MailroomMailroom home

Create and manage agents

An agent is a named sender with its own inbox, rules, budget and keys.

An agent is one AI worker with:

  • Its own address and inbox. Mail to riley@your-workspace.mailroomapi.com (or an address on your domain) goes to Riley's inbox only.
  • Rules. When it may send on its own and when it must ask you.
  • A daily budget. Past it, the agent pauses itself.
  • Its own keys. An agent key can send and read that agent's mail. It cannot approve mail, change rules, or see other agents.
  • A signature. Every email it sends is signed, so anyone can check which agent sent it (see Signed identity).

Make one agent per job: support, scheduling, billing. Each has its own inbox and its own rules.

In the dashboard

Open Agents → fill in the form → Create agent. Pick the address's domain from the list: your managed subdomain, or any domain you have verified. With Create a live key for it now ticked, the agent's key is shown once; copy it then. You can make more keys on the agent's page.

Each agent has a page with:

SectionWhat it is for
Waiting for your approvalMail the agent wants to send that needs your yes. Approve, edit and approve, or reject.
InboxEvery conversation, with its state: needs reply, waiting on customer, needs you, resolved.
SentWhat the agent sent and what happened to it (delivered, bounced…).
SettingsApproval mode, content rules, daily budget, pause.
Notify your agentA webhook URL we call when the agent gets mail. See Connect your agent.
KeysCreate and revoke this agent's keys.

When it emails someone

ModeWhat happens
Ask me before it emails someone new (default)Replies to people who wrote first, and to anyone it has emailed before, go straight out. Everyone else waits for you.
Ask me before every emailNothing goes out until you approve it. Good for a new agent you are still getting to know.
Send without askingFor agents you supervise somewhere else, like a Claude Code session where you approve each email in chat. Limits still apply.

Always ask me first if the email…

On top of the mode, hold any email that:

  • mentions certain words, e.g. refund, cancel, lawyer, bank details. Whole words only, so refunded does not match refund.
  • mentions an amount over a number you set. Catches $1,250.00, 300 USD, €300.
  • links to another site: anything other than the recipient's own domain or a domain on your allowlist.

These are checked before anything that would let the email straight through, including replies in a thread.

Pause and delete

Pause stops the agent at once: its queued mail is cancelled and new sends are refused until you resume. Delete revokes its keys and removes its inbox and conversations; records of mail it already sent are kept.

With the API

Use a workspace key (one not tied to an agent) from API keys.

curl -X POST https://api.mailroomapi.com/v1/agents \
  -H "Authorization: Bearer $MAILROOM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Riley",
    "slug": "riley",
    "description": "Schedules meetings with customers",
    "daily_send_budget": 100,
    "inbox": { "managed": true, "local_part": "riley" }
  }'

The response has the agent's id, inbox_id and policy_id. To give the agent an address on your own verified domain instead, pass "inbox": { "domain_id": "dom_…", "local_part": "support" }.

Then mint a key for it:

curl -X POST https://api.mailroomapi.com/v1/api-keys \
  -H "Authorization: Bearer $MAILROOM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Riley",
    "agent_id": "agt_…",
    "mode": "live",
    "scopes": ["emails:send", "emails:read", "inboxes:read", "inboxes:write"]
  }'

The key field is returned once. Other calls:

CallDoes
GET /v1/agentsAgents, with inbox_address, sent_today, pending_approvals, received_7d, last_activity_at
PATCH /v1/agents/{id}Change name, description, daily_send_budget
POST /v1/agents/{id}/pause · /resumeStop or restart sending
DELETE /v1/agents/{id}Delete the agent, its keys and its inbox
PATCH /v1/policies/{policy_id}Change its rules (see Governance)

mr_test_ keys work the same way but never deliver real mail; see Sandbox.

On this page