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",
});const result = await client.labels.add({
label: "label",
chatId: "447123456789@c.us",
});curl -X PUT "http://localhost:8080/api/labels/add" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"label": "label",
"chatId": "447123456789@c.us"
}'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({});const result = await client.labels.getAll({});curl -X GET "http://localhost:8080/api/labels/getAll" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{}'Parameters
This method does not define input parameters.
Output
| Prop | Value |
|---|---|
| Return type | unknown[] |
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",
});const result = await client.labels.getChats({
label: "label",
});curl -G "http://localhost:8080/api/labels/getChats" \
-H "x-api-key: YOUR_API_KEY" \
--data-urlencode "label=label"Parameters
Prop
Type
Output
| Prop | Value |
|---|---|
| Return type | unknown[] |
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",
});const result = await client.labels.remove({
label: "label",
chatId: "447123456789@c.us",
});curl -X PUT "http://localhost:8080/api/labels/remove" \
-H "content-type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
--data '{
"label": "label",
"chatId": "447123456789@c.us"
}'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!
