Delete Inboxes
POST
/v0/inboxes/delete
curl -s -X POST "https://api.yoagent.dev/v0/inboxes/delete" \ -H "Authorization: Bearer $YOAGENT_KEY" \ -H "Content-Type: application/json" \ -d '{"inbox_ids":["inb_01je56wqswfmn9pgbc1wq8tjgq"]}'const response = await fetch("https://api.yoagent.dev/v0/inboxes/delete", { method: "POST", headers: { Authorization: `Bearer ${process.env.YOAGENT_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "inbox_ids": [ "inb_01je56wqswfmn9pgbc1wq8tjgq" ] }),});if (!response.ok) throw new Error(await response.text());import os
import requests
response = requests.post( "https://api.yoagent.dev/v0/inboxes/delete", headers={"Authorization": f"Bearer {os.environ['YOAGENT_KEY']}"}, json={ "inbox_ids": [ "inb_01je56wqswfmn9pgbc1wq8tjgq", ], }, timeout=60,)response.raise_for_status()Delete inboxes with all their mail (up to 200): all of them or none — one the caller does not see is 404, one
it may not delete (no inbox_delete on it, a catch-all) refuses them all.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
InboxesDelete
Delete inboxes with all their mail: all of them or none.
object
inbox_ids
required
Inbox Ids
The inboxes to delete.
Array<string>
Responses
Section titled “Responses”Successful Response
default
Section titled “default”An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: Errors.