Delete Labels
POST
/v0/labels/delete
curl -s -X POST "https://api.yoagent.dev/v0/labels/delete" \ -H "Authorization: Bearer $YOAGENT_KEY" \ -H "Content-Type: application/json" \ -d '{"label_ids":["lbl_01je56wqswfmn9pgbc1wq8tjgq"]}'const response = await fetch("https://api.yoagent.dev/v0/labels/delete", { method: "POST", headers: { Authorization: `Bearer ${process.env.YOAGENT_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "label_ids": [ "lbl_01je56wqswfmn9pgbc1wq8tjgq" ] }),});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/labels/delete", headers={"Authorization": f"Bearer {os.environ['YOAGENT_KEY']}"}, json={ "label_ids": [ "lbl_01je56wqswfmn9pgbc1wq8tjgq", ], }, timeout=60,)response.raise_for_status()data = response.json()Delete labels (up to 200), all of them or none: they come off every message and thread of their projects.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
LabelsDelete
Delete labels: they come off every message and thread of their projects. All of them or none.
object
label_ids
required
Label Ids
The labels to delete.
Array<string>
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
LabelsDeleted
Labels were deleted.
object
deleted
required
Deleted
Array<string>
Example
{ "deleted": [ "lbl_01je56wqswfmn9pgbc1wq8tjgq" ]}default
Section titled “default”An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: Errors.