Reorder Projects
curl -s -X PUT "https://api.yoagent.dev/v0/projects/order" \ -H "Authorization: Bearer $YOAGENT_KEY" \ -H "Content-Type: application/json" \ -d '{"ids":["prj_01je56wqswfmn9pgbc1wq8tjgq"]}'const response = await fetch("https://api.yoagent.dev/v0/projects/order", { method: "PUT", headers: { Authorization: `Bearer ${process.env.YOAGENT_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "ids": [ "prj_01je56wqswfmn9pgbc1wq8tjgq" ] }),});if (!response.ok) throw new Error(await response.text());const data = await response.json();import os
import requests
response = requests.put( "https://api.yoagent.dev/v0/projects/order", headers={"Authorization": f"Bearer {os.environ['YOAGENT_KEY']}"}, json={ "ids": [ "prj_01je56wqswfmn9pgbc1wq8tjgq", ], }, timeout=60,)response.raise_for_status()data = response.json()Put the projects you see in a new order: each of their ids once, first to last (a changed list is refused; the others keep their places).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”A new order of the projects the caller sees: each of their ids once, first to last (the others keep their places).
object
Every id of the list, each once, first to last.
Responses
Section titled “Responses”Successful Response
The projects the caller sees, in their hand-made order.
object
A project: its own mail subdomain (<slug>.<shared domain> when it was made), inboxes and webhooks.
object
Goes up by one on every change: of two copies, the one with the higher version is the newer.
Its short description; empty: none.
Its catch-all inboxes take mail for unknown addresses; off, such mail is refused and they are hidden.
Mail to an unknown address makes its inbox (only with the catch-all on).
Mail to <name>+<tag>@ reaches the inbox of <name>@, the tag kept on the message.
The project’s shared mail subdomain: any <name>@<subdomain> reaches it.
What the caller may do in this project; null: everything (an owner).
What the caller may do in single inboxes of this project beyond grant: only the inbox permissions the
project does not give, not closed; an inbox the project covers is absent.
object
Whether the caller’s access allows deleting it: access to everything, a full admin (the role must allow it too:
project_delete).
The organization’s only project: it cannot be deleted (an organization keeps one).
Its place in the organization’s order (PUT /v0/projects/order): the list is sorted by it, then by id.
Example
{ "count": 1, "projects": [ { "version": 1, "project_id": "prj_01je56wqswfmn9pgbc1wq8tjgq", "name": "Web app", "description": "Sign-up and password reset mail", "image": "img_01je56wqswfmn9pgbc1wq8tjgq", "catch_all_enabled": true, "auto_create_inboxes": true, "plus_addresses_enabled": true, "slug": "k7m2xq4p", "subdomain": "k7m2xq4p.yoagent.email", "grant": "full", "inbox_grants": {}, "deletable": true, "only": false, "position": 1, "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.