Skip to content

Update Label

PATCH
/v0/labels/{label_id}
curl -s -X PATCH "https://api.yoagent.dev/v0/labels/lbl_01je56wqswfmn9pgbc1wq8tjgq" \
-H "Authorization: Bearer $YOAGENT_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"verified"}'

Rename a label: every message and thread of its project that carries it carries the new name; a name another label of the project has is 409.

label_id
required
Label Id
string
/^lbl_[0-7][0-9a-hjkmnp-tv-z]{25}$/
Media typeapplication/json
LabelUpdate

Rename a label: every message and thread of its project that carries it carries the new name.

object
name
required
Name

The label’s new name.

string
>= 1 characters <= 64 characters /^[\w.:-]+$/

Successful Response

Media typeapplication/json
LabelOut

A project’s own label.

object
version
required
Version

Goes up by one on every change: of two copies, the one with the higher version is the newer.

integer
label_id
required
Label Id
string
/^lbl_[0-7][0-9a-hjkmnp-tv-z]{25}$/
project_id
required
Project Id
string
/^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$/
name
required
Name
string

Example

{
"version": 1,
"label_id": "lbl_01je56wqswfmn9pgbc1wq8tjgq",
"project_id": "prj_01je56wqswfmn9pgbc1wq8tjgq",
"name": "verified"
}

An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: Errors.