Skip to content

Create Inbox

POST
/v0/inboxes
curl -s -X POST "https://api.yoagent.dev/v0/inboxes" \
-H "Authorization: Bearer $YOAGENT_KEY" \
-H "Content-Type: application/json" \
-d '{"project_id":"prj_01je56wqswfmn9pgbc1wq8tjgq","username":"signup-test","domain":"mail.example.com","display_name":"Signup tests","client_id":"ci-run-1842"}'

Create an inbox (random username and the shared subdomain unless given).

Media typeapplication/json
InboxCreate

Create an inbox. Without username a random one is picked; without domain the project’s shared subdomain; domain without project_id names the project too.

object
project_id
Project Id

The project; omitted: the domain’s, else the first project, in the dashboard’s order, where the caller may create it.

Any of:
string
/^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$/
username
Username

The part of the address before @; omitted: a random one.

Any of:
string
>= 1 characters <= 64 characters /^[a-z0-9](?:[a-z0-9._-]{0,62}[a-z0-9])?$/
domain
Domain

The project’s shared subdomain or a custom domain of the organization; omitted: the shared subdomain.

Any of:
string
display_name
Display Name

The name its mail is sent under.

Any of:
string
>= 1 characters <= 100 characters
client_id
Client Id

Your idempotency key: creating again with the same client_id returns the same inbox.

Any of:
string
>= 1 characters <= 100 characters
metadata
Metadata

Your own data about the inbox, a JSON object of at most 16 KB, answered as given.

Any of:
object
key
additional properties

Successful Response

Media typeapplication/json
InboxOut

An inbox.

object
version
required
Version

Goes up by one on every change: of two copies, the one with the higher version is the newer.

integer
inbox_id
required
Inbox Id
string
/^inb_[0-7][0-9a-hjkmnp-tv-z]{25}$/
project_id
required
Project Id
string
/^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$/
address
required
Address

Its local part may come from a sender: auto-create makes inboxes for addresses mail arrived at.

string
is_catch_all
required
Is Catch All
boolean
display_name
required
Display Name

Set by whoever made the inbox (an agent, too): text from outside, like metadata and client_id.

Any of:
string
metadata
required
Metadata
object
key
additional properties
client_id
required
Client Id
Any of:
string
deletable
required
Deletable

Whether the caller may delete it (inbox_delete on it; never the catch-all).

boolean
labels_editable
required
Labels Editable

Whether the caller may change the labels of its mail — mark it read or unread, label it (message_update on the inbox).

boolean
labels_manageable
required
Labels Manageable

Whether the caller may rename and delete its project’s own labels (message_update on the project: the change reaches every inbox of it).

boolean
mail_deletable
required
Mail Deletable

Whether the caller may delete its messages and threads (message_delete on the inbox).

boolean
mail_sendable
required
Mail Sendable

Whether the caller may send from it — new mail, replies and forwards of mail it reads (message_send on the inbox; never from the catch-all).

boolean
created_at
required
Created At
string format: date-time

Example

{
"version": 1,
"inbox_id": "inb_01je56wqswfmn9pgbc1wq8tjgq",
"project_id": "prj_01je56wqswfmn9pgbc1wq8tjgq",
"address": "test@k7m2xq4p.yoagent.email",
"is_catch_all": false,
"display_name": "Signup tests",
"metadata": {},
"client_id": "ci-run-1842",
"deletable": true,
"labels_editable": true,
"labels_manageable": true,
"mail_deletable": true,
"mail_sendable": true,
"created_at": "2026-12-01T12:00:00Z"
}

An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: Errors.