Documentation
Sign inGet started

List a mailbox's labels

GET
/v1/email/mailboxes/{mailbox_id}/labels
const labels = await bird.email.mailboxes.labels("mbx_01abc");
console.log(labels.data.map((label) => label.name));
Returns the labels available in a mailbox. First, the built-in system labels:
  • The placements inbox, archive, spam, blocked, and sent.
  • trash.
  • unread.
Then, every custom label currently in use on its conversations and messages. You apply and remove labels through the conversation and message update endpoints, and that is also what creates or removes a custom label: it exists for as long as at least one message or conversation has it applied.
Contenu de la réponse
data
array of object
obligatoire
Afficher les attributs enfants
data.name
string
obligatoire
The label name, as it appears on conversations and messages.
data.type
string
obligatoire
system labels are the built-in placements a message can be in:
  • Inbox.
  • Archive.
  • Spam.
  • Blocked.
  • Sent.
  • Trash.
  • Unread.
custom labels are the workspace's own tags.
Possible values: system, custom