Create Inbox
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"}'const response = await fetch("https://api.yoagent.dev/v0/inboxes", { method: "POST", headers: { Authorization: `Bearer ${process.env.YOAGENT_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "project_id": "prj_01je56wqswfmn9pgbc1wq8tjgq", "username": "signup-test", "domain": "mail.example.com", "display_name": "Signup tests", "client_id": "ci-run-1842" }),});if (!response.ok) throw new Error(await response.text());const data = await response.json();import os
import requests
response = requests.post( "https://api.yoagent.dev/v0/inboxes", headers={"Authorization": f"Bearer {os.environ['YOAGENT_KEY']}"}, json={ "project_id": "prj_01je56wqswfmn9pgbc1wq8tjgq", "username": "signup-test", "domain": "mail.example.com", "display_name": "Signup tests", "client_id": "ci-run-1842", }, timeout=60,)response.raise_for_status()data = response.json()Create an inbox (random username and the shared subdomain unless given).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”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
Responses
Section titled “Responses”Successful Response
An inbox.
object
Goes up by one on every change: of two copies, the one with the higher version is the newer.
Its local part may come from a sender: auto-create makes inboxes for addresses mail arrived at.
object
Whether the caller may delete it (inbox_delete on it; never the catch-all).
Whether the caller may change the labels of its mail — mark it read or unread, label it (message_update on
the inbox).
Whether the caller may rename and delete its project’s own labels (message_update on the project: the
change reaches every inbox of it).
Whether the caller may delete its messages and threads (message_delete on the inbox).
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).
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"}default
Section titled “default”An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: Errors.