open-wa v5 is alpha. Use v4.76.0 for mature production systems unless you are validating v5.
The Client APIAPI ExplorerLicensing

Labels Client API

Generated client method reference for the labels namespace.

Client Labels Methods Wally

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

PropValue
Namespacelabels
Actionupdate
Functionalitybusiness-only
Positional parameter orderlabel, chatId
Aliaseslabels.add
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/labels/addaddLabelActive
AliasPUT/api/addLabeladdLabelActive

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

PropValue
Return typeboolean

getAllLabels

Get all labels

Overview

PropValue
Namespacelabels
Actionread
Functionalitybusiness-only
Positional parameter order-
Aliaseslabels.all, labels.getAll, labels.list, listLabels
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/labels/getAllgetAllLabelsActive
AliasGET/api/getAllLabelsgetAllLabelsActive
AliasGET/api/labels/alllabels.allActive
AliasGET/api/labels/listlabels.listActive
AliasGET/api/listLabelslistLabelsActive

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

PropValue
Return typeunknown[]

getChatsByLabel

Get chats by label

Overview

PropValue
Namespacelabels
Actionread
Functionalitybusiness-only
Positional parameter orderlabel
Aliaseslabels.getChats, labels.getChatsBy
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryGET/api/labels/getChatsgetChatsByLabelActive
AliasGET/api/getChatsByLabelgetChatsByLabelActive
AliasGET/api/labels/getChatsBylabels.getChatsByActive

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

PropValue
Return typeunknown[]

removeLabel

Remove label from chat

Overview

PropValue
Namespacelabels
Actionupdate
Functionalitybusiness-only
Positional parameter orderlabel, chatId
Aliaseslabels.remove
Deprecated aliases-
Licensenone
WAPI override-
DeprecatedNo

Routes

TypeMethodPathNameStatus
PrimaryPUT/api/labels/removeremoveLabelActive
AliasPUT/api/removeLabelremoveLabelActive

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

PropValue
Return typeboolean
Wally the Walrus typing

Was this helpful?

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

On this page