List a mailbox's labels
/v1/email/mailboxes/{mailbox_id}/labelsconst labels = await bird.email.mailboxes.labels("mbx_01abc");
console.log(labels.data.map((label) => label.name));labels = client.email.mailboxes.labels("mbx_01krdgeqcxet5s7t44vh8rt9mg")
for label in labels.data:
print(label.name)labels, err := client.Email.Mailboxes.Labels(context.Background(), "mbx_123")
if err != nil {
log.Fatal(err)
}
for _, l := range labels.Data {
fmt.Println(l.Name)
}$labels = $bird->email->mailboxes->labels('mbx_01krdgeqcxet5s7t44vh8rt9mg');
foreach ($labels->getData() ?? [] as $label) {
echo $label->getName(), "\n";
}bird email mailboxes labels <mailbox-id>curl -X GET "https://us1.platform.bird.com/v1/email/mailboxes/{mailbox_id}/labels" \
-H "Authorization: Bearer $TOKEN"{
"data": [
{
"name": "inbox",
"type": "system"
}
]
}
Returns the labels available in a mailbox. First, the built-in system labels:
- The placements
inbox,archive,spam,blocked, andsent. trash.unread.
Then, every custom label in the workspace, ordered by name. All of a
workspace's mailboxes share its custom labels. Apply and remove custom
labels through the conversation and message update endpoints; applying a
custom label name the workspace does not have yet creates that label, and
reserved names are refused. Removing a custom label only unassigns it: the
label stays in the workspace and in this list until it is deleted. System
labels change state instead: a message update takes unread and trash.
A conversation's read state changes through read and its folder through
folder (inbox, archive or spam). Deleting it moves it to the
trash, or removes it for good with permanent=true; sent and blocked
are set automatically.
Parameter
mailbox_idstringMailbox ID or email address in this workspace.
Antwort-Payload
dataVerwandte Ressourcen
Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema.