> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# List labels

> Lists every label registered on the instance

**Auth:** `TokenAccount` or `TokenInstance` • **Rate-limit:** `Global` (100/min) • **Idempotent:** yes

## Description

Returns every label known to the instance, including those created via API and those imported through WhatsApp app state. Each label carries an `id`, `name`, `color` (native WhatsApp palette), `type`, and `deleted` flag.

<Info>
  `color` is an integer between **0 and 10** that maps to the official WhatsApp Business colors. Tags marked with `deleted=true` still appear in the list until the sync removes them for good.
</Info>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://ryzeapi.cloud/api/chat/tag/$Instance_Name" \
    -H "token: $Token_Instance"
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/chat/tag/${process.env.Instance_Name}`, {
    method: "GET",
    headers: {
      "token": process.env.Token_Instance
    }
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.get(
      f"https://ryzeapi.cloud/api/chat/tag/{os.environ['Instance_Name']}",
      headers={"token": os.environ["Token_Instance"]}
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
  )

  func main() {
      req, _ := http.NewRequest("GET", "https://ryzeapi.cloud/api/chat/tag/"+os.Getenv("Instance_Name"), nil)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

`tags` is the array of labels known to the WhatsApp Business account; `total` echoes the size. Each entry brings `id` (use in `tags-assign`/`tags-unassign`/`tags-delete`), `name`, `color` (0–10), and `type`. Labels marked with `deleted: true` represent removals pending propagation.

```json 200 OK theme={null}
{
  "success": true,
  "message": "Tags retrieved successfully",
  "tags": [
    { "id": "1", "name": "Important", "color": 0, "type": "CUSTOM", "deleted": false },
    { "id": "2", "name": "VIP", "color": 5, "type": "CUSTOM", "deleted": false }
  ],
  "total": 2
}
```

## Path parameters

<ParamField path="instance" type="string" required>
  Instance name.
</ParamField>

## Headers

| Name    | Required                 | Example        | Description                    |
| ------- | ------------------------ | -------------- | ------------------------------ |
| `token` | yes (or `Authorization`) | `a1b2c3d4-...` | TokenAccount or TokenInstance. |

## Error responses

| HTTP | `error.message`                         | When it happens    |
| ---- | --------------------------------------- | ------------------ |
| 400  | `Instance name is required`             | Empty `:instance`. |
| 401  | `Invalid token`                         | ,                  |
| 404  | `Instance not found`                    | ,                  |
| 503  | `Instance is not connected to WhatsApp` | ,                  |

```json Error 401 theme={null}
{
  "success": false,
  "error": { "message": "Invalid token" }
}
```

## Related

<CardGroup cols={2}>
  <Card title="Create label" href="/en/api/chat/tags-create">
    `POST /api/chat/tag/:instance`
  </Card>

  <Card title="Assign to a chat" href="/en/api/chat/tags-assign">
    `POST /api/chat/assignTag/:instance`
  </Card>
</CardGroup>
