Sign inGet Started

Create a label

POST
/v1/labels
const label = await bird.labels.create({
  name: "refund-request",
  color: "#E5484D",
  description: "The customer asks for their money back.",
});
console.log(label.id);
响应201
{
  "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.

请求载荷

name
string
必填

The 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.

color
string

The label colour as a #RRGGBB hex value.

description
string

When to apply the label. People and agents read it when they decide which label fits.

响应载荷

id
string
必填

ID of the label, accepted by every operation that takes a label_id. It stays the same when the label is renamed.

name
string
必填

The 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.

color
nullable string
必填

The label colour as a #RRGGBB hex value, or null when none is set.

description
nullable string
必填

When to apply the label, or null when none is set.

created_at
string
必填
updated_at
string
必填

继续查看此主题的文档、指南和示例。