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));
Réponse200
{
  "data": [
    {
      "name": "inbox",
      "type": "system"
    }
  ]
}

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. Apply and remove labels through the conversation and message update endpoints. These actions also create and remove custom labels. A custom label exists while at least one message or conversation uses it.

Paramètres

mailbox_idstring

Mailbox identifier. Starts with mbx_.

Contenu de la réponse

data
array of object
obligatoire
Afficher les attributs enfants