Labels Client API
Generated client method reference for the labels namespace.

Labels Client API
Generated file warning: this page is generated by
packages/schema/scripts/gen-client-reference-docs.ts. Do not edit generated method content by hand.
This page documents 4 schema-registry client methods in the labels namespace.
addLabel
Add label to chat
Overview
| Prop | Value |
|---|---|
| Namespace | labels |
| Action | update |
| Functionality | business-only |
| Positional parameter order | label, chatId |
| Aliases | labels.add |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/labels/add | addLabel | Active |
| Alias | PUT | /api/addLabel | addLabel | Active |
Usage
const result = await client.addLabel({
label: "label",
chatId: "447123456789@c.us",
});
// namespaced form: client.labels.add(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |
getAllLabels
Get all labels
Overview
| Prop | Value |
|---|---|
| Namespace | labels |
| Action | read |
| Functionality | business-only |
| Positional parameter order | - |
| Aliases | labels.all, labels.getAll, labels.list, listLabels |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/labels/getAll | getAllLabels | Active |
| Alias | GET | /api/getAllLabels | getAllLabels | Active |
| Alias | GET | /api/labels/all | labels.all | Active |
| Alias | GET | /api/labels/list | labels.list | Active |
| Alias | GET | /api/listLabels | listLabels | Active |
Usage
const result = await client.getAllLabels({});
// namespaced form: client.labels.getAll(...)Parameters
This method does not define input parameters.
Output
| Prop | Value |
|---|---|
| Return type | any[] |
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
getChatsByLabel
Get chats by label
Overview
| Prop | Value |
|---|---|
| Namespace | labels |
| Action | read |
| Functionality | business-only |
| Positional parameter order | label |
| Aliases | labels.getChats, labels.getChatsBy |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | GET | /api/labels/getChats | getChatsByLabel | Active |
| Alias | GET | /api/getChatsByLabel | getChatsByLabel | Active |
| Alias | GET | /api/labels/getChatsBy | labels.getChatsBy | Active |
Usage
const result = await client.getChatsByLabel({
label: "label",
});
// namespaced form: client.labels.getChats(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | any[] |
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
removeLabel
Remove label from chat
Overview
| Prop | Value |
|---|---|
| Namespace | labels |
| Action | update |
| Functionality | business-only |
| Positional parameter order | label, chatId |
| Aliases | labels.remove |
| Deprecated aliases | - |
| License | none |
| WAPI override | - |
| Deprecated | No |
Routes
| Type | Method | Path | Name | Status |
|---|---|---|---|---|
| Primary | PUT | /api/labels/remove | removeLabel | Active |
| Alias | PUT | /api/removeLabel | removeLabel | Active |
Usage
const result = await client.removeLabel({
label: "label",
chatId: "447123456789@c.us",
});
// namespaced form: client.labels.remove(...)Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | boolean |

Was this helpful?
Wally and his cute companion coffee mug are coding day and night to keep this up-to-date!
