# Labels

Folders and labels: CRUD, per-label statistics, and the IMAP-shaped UID/vanished feeds a mail client syncs from.

- `POST` [Create a new custom label](/docs/api/labels/post_LabelCreate): Creates a new user folder or label with a fresh UID validity epoch.
- `GET` [List mailbox labels and folder statistics](/docs/api/labels/get_LabelList): Returns all system and custom labels with message counts, unread counts, UID validity, and next UID sequence numbers.
- `PATCH` [Rename a label or update folder settings](/docs/api/labels/patch_LabelRename): Renames a custom label and/or updates its display sort order, subscription state, and color.
- `DELETE` [Delete a custom label](/docs/api/labels/delete_LabelDelete): Deletes a custom label.
- `PATCH` [Rename a label or update folder settings, by id](/docs/api/labels/patch_LabelRenameById): Keyed on the label's numeric id — as GET /labels and POST /labels report it — rather than on its name.
- `DELETE` [Delete a custom label, by id](/docs/api/labels/delete_LabelDeleteById): Keyed on the label's numeric id — as GET /labels and POST /labels report it — rather than on its name.
- `GET` [List messages in a label by UID](/docs/api/labels/get_LabelMessageList): Returns messages in a label ordered by UID, optionally filtered by a minimum and maximum UID range.
- `PATCH` [Update flags, labels and keywords for every message in a folder](/docs/api/labels/patch_LabelMessagesUpdate): Applies one patch to a UID RANGE of this label — the write twin of GET /labels/{label}/messages, and the way to act on a whole folder without naming its…
- `PATCH` [Update flags, labels and keywords for every message in a folder, by label id](/docs/api/labels/patch_LabelMessagesUpdateById): Keyed on the label's numeric id — as GET /labels and POST /labels report it — rather than on its name.
- `GET` [List message sync index for a label](/docs/api/labels/get_LabelUidList): Returns compact message records (UID, MODSEQ, flags, size, dates) ordered by UID for efficient folder synchronization (up to 10,000 per page).
- `GET` [List vanished (expunged) message UIDs](/docs/api/labels/get_LabelVanished): Returns UIDs of messages expunged from the label since a specified change sequence (MODSEQ) number.
- `POST` [Expunge deleted messages from a label](/docs/api/labels/post_LabelExpunge): Detaches messages marked with the deleted flag from this label.
