---
title: "List labels with thread counts"
method: GET
path: "/v1/labels"
tags: ["mail"]
---

# List labels with thread counts

`GET /v1/labels`

## Request

- Base URL: `https://botmail.pro`
- URL: `https://botmail.pro/v1/labels`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `bm_session`

Scope: read. Pending claim keys allowed.

## Query parameters

- `mailbox_id` string

## Response `200`

Labels, alphabetical.

- object
  - `labels` LabelCount[], required
    - `label` string, required
    - `threads` integer, required
    - `color` string: #rrggbb, when set with PATCH /v1/labels/{label}

## Other responses

- `401`: Missing or invalid credentials (`unauthorized`, `invalid_token`).
- `403`: The credential can't do this (`forbidden`, `csrf`, `account_inactive`, …). Missing scopes are listed in `details.required_scope`; pending keys get a hint to wait for the claim.
- `404`: Not found or not accessible with this credential.

---

[API](https://skmtc.dev/botmail/apis/botmail-api.md) · [All operations](https://skmtc.dev/botmail/apis/botmail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/botmail/apis/botmail-api/revisions/49f736362bf2?raw)
