Inboxes and addresses
Projects and their subdomains
Section titled “Projects and their subdomains”An organization holds projects — one per application or environment, say staging and ci — and every inbox
belongs to a project. Each project gets its own subdomain of yoagent.email, a random name such as
k7m2xq4p.yoagent.email that never changes, and a test@ inbox on it, so a new project receives mail right away.
A project can also receive on a domain of your own (Custom domains).
test@ is an ordinary inbox: it counts toward your plan’s inboxes, and you may delete it (it is not created again).

Create an inbox
Section titled “Create an inbox”curl -s https://api.yoagent.dev/v0/inboxes \ -H "Authorization: Bearer $YOAGENT_KEY" \ -H "Content-Type: application/json" \ -d '{"username": "signup", "display_name": "Sign-up tests", "client_id": "ci-signup", "metadata": {"suite": "e2e"}}'create_inbox(username="signup", display_name="Sign-up tests", client_id="ci-signup", metadata={"suite": "e2e"})Every field is optional:
| Field | What it does |
|---|---|
username |
The part before @: lower-case letters, digits, ., _ and -, starting and ending with a letter or digit. Without it, a random name such as inbox-3f9a1c2e. |
domain |
A verified domain of your own; without it, the project’s subdomain. A domain also names its project. |
project_id |
The project; without it, the domain’s, or the first project the key may create inboxes in. |
display_name |
The name mail from the inbox is sent under: Sign-up tests <signup@…>. |
client_id |
Your own name for the inbox, unique in its project (up to 100 characters). Creating again with the same client_id returns the same inbox instead of a second one, so a retried test setup is safe; without project_id, a client_id used in several projects answers 409 conflict. |
metadata |
Any JSON object of yours, up to 16 KB, returned with the inbox. |
A taken address is 409 already_exists; more inboxes than your plan allows, 403 limit_reached. Later, only
display_name and metadata change (PATCH /v0/inboxes/{inbox_id}, update_inbox); metadata is replaced whole.
The address, the domain and client_id stay.
An address works as an id
Section titled “An address works as an id”Wherever an operation or a tool names one inbox, its address works instead of its inb_… id:
curl -s https://api.yoagent.dev/v0/inboxes/signup@k7m2xq4p.yoagent.email -H "Authorization: Bearer $YOAGENT_KEY"A test that knows its address never has to look the id up. The operations on many inboxes at once
(POST /v0/inboxes/delete) take ids only.
Plus addresses, catch-all and inboxes made by mail
Section titled “Plus addresses, catch-all and inboxes made by mail”Three settings of a project decide what happens to mail for an address with no inbox. They are paid features (Plans and limits):
| Setting | What it does |
|---|---|
| Plus addresses | test+anything@ reaches the inbox test@; the part after + is kept on the message as plus_tag. One inbox serves many tests. |
| Catch-all | Mail to any other address of the project’s domains lands in that domain’s catch-all inbox, such as *@k7m2xq4p.yoagent.email; the message’s envelope_to keeps the address it was sent to. |
| Auto-create inboxes | Needs the catch-all: mail to an unknown address that is a valid inbox name creates an inbox for it, while your plan has room for one, instead of landing in the catch-all. A deleted test@ is not made again this way. |
Turn them on in the dashboard (Projects → a project’s settings) or with PATCH /v0/projects/{project_id}
(plus_addresses_enabled, catch_all_enabled, auto_create_inboxes). On a plan without them the answer is
403 plan_required. A new project starts with plus addresses and the catch-all on when the plan has them.
With them off, mail to an address with no inbox is refused while the sending server is still talking to ours (SMTP
550 5.1.1 No such user here): the sender gets a bounce, and nothing is stored.
The catch-all inbox is a little different from the others: it is never deleted (409 catch_all), does not count
toward your plan’s inboxes, and does not send — to answer mail that came through it, create an inbox for that address.
With the catch-all turned off, it and its mail are hidden, not deleted.
Delete an inbox
Section titled “Delete an inbox”DELETE /v0/inboxes/{inbox_id} (MCP: delete_inbox), or up to 200 at once with
POST /v0/inboxes/delete (delete_inboxes). The inbox goes with all its threads, messages and attachments, for good
— there is no trash. An API key that reached only this inbox is revoked; a webhook that watched only this inbox stays,
and receives nothing.