List Inbox Labels
curl -s "https://api.yoagent.dev/v0/inboxes/inb_01je56wqswfmn9pgbc1wq8tjgq/labels" \ -H "Authorization: Bearer $YOAGENT_KEY"const response = await fetch("https://api.yoagent.dev/v0/inboxes/inb_01je56wqswfmn9pgbc1wq8tjgq/labels", { headers: { Authorization: `Bearer ${process.env.YOAGENT_KEY}`, },});if (!response.ok) throw new Error(await response.text());const data = await response.json();import os
import requests
response = requests.get( "https://api.yoagent.dev/v0/inboxes/inb_01je56wqswfmn9pgbc1wq8tjgq/labels", headers={"Authorization": f"Bearer {os.environ['YOAGENT_KEY']}"}, timeout=60,)response.raise_for_status()data = response.json()List an inbox’s labels in name order with how many of its messages carry each: every label of its project
(0 too) and the system labels its messages carry (received: messages that arrived, unread: not read yet);
labels keeps only those, system only system or only the project’s own. unread_received: messages
that arrived and are not read yet.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Inbox id (inb_…), address or *@domain (the catch-all)
Query Parameters
Section titled “Query Parameters”How many labels a page holds.
Only these labels (their counts: a folder’s size).
Responses
Section titled “Responses”Successful Response
A page of an inbox’s labels with their counts: every own label of its project (0 when no message of the inbox
carries it) and the system labels its messages carry; unread_received — messages that came in and are not read
yet (the Unread folder; Read is received less these).
object
Example
{ "count": 1, "next_page_token": null, "labels": [ { "label_id": null, "label": "unread", "system": true, "count": 1 } ], "unread_received": 1}default
Section titled “default”An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: Errors.