Create a label
/v1/labelsconst label = await bird.labels.create({
name: "refund-request",
color: "#E5484D",
description: "The customer asks for their money back.",
});
console.log(label.id);label = client.labels.create(
name="refund-request",
color="#E5484D",
description="The customer asks for their money back.",
)
print(label.id)label, err := client.Labels.Create(context.Background(), bird.LabelsCreateParams{
Name: "refund-request",
Color: bird.Ptr("#E5484D"),
Description: bird.Ptr("The customer asks for their money back."),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(label.Id)$label = $bird->labels->create(
(new LabelCreate())
->setName('refund-request')
->setColor('#E5484D')
->setDescription('The customer asks for their money back.'),
);
echo $label->getId();bird labels create 'Hot lead' \
--color '#E5484D' \
--description 'Inbound sales enquiry from a company. Not support requests or vendors.'curl -X POST "https://us1.platform.bird.com/v1/labels" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Hot lead",
"color": "#E5484D",
"description": "Inbound sales enquiry from a company. Not support requests or vendors."
}'{
"id": "lbl_01krdgeqcxet5s7t44vh8rt9mg",
"name": "Hot lead",
"color": "#E5484D",
"description": "Inbound sales enquiry from a company. Not support requests or vendors.",
"created_at": "2026-05-20T09:14:52Z",
"updated_at": "2026-05-25T16:42:01Z"
}
Adds a label to the workspace's catalogue. Give it a description of when to apply it, so people and agents label conversations the same way.
Names are unique in the workspace regardless of case; a name already in
use returns a conflict error. System names such as inbox, sent,
unread, open and assigned are reserved. Creating a label fails once
the workspace has 100 labels.
请求载荷
nameThe label name, unique in the workspace regardless of case. No commas, control characters, or leading or trailing whitespace. System names such as inbox, sent, unread, open or assigned are reserved.
colorThe label colour as a #RRGGBB hex value.
descriptionWhen to apply the label. People and agents read it when they decide which label fits.
响应载荷
idID of the label, accepted by every operation that takes a label_id. It stays the same when the label is renamed.
nameThe label name, unique in the workspace regardless of case. No commas, control characters, or leading or trailing whitespace. System names such as inbox, sent, unread, open or assigned are reserved.
colorThe label colour as a #RRGGBB hex value, or null when none is set.
descriptionWhen to apply the label, or null when none is set.
created_atupdated_at相关资源
继续查看此主题的文档、指南和示例。