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",
});
// namespaced form: client.labels.add(...)

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({});
// namespaced form: client.labels.getAll(...)

Parameters

This method does not define input parameters.

Output

PropValue
Return typeany[]

Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.

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",
});
// namespaced form: client.labels.getChats(...)

Parameters

Prop

Type

Output

PropValue
Return typeany[]

Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.

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",
});
// namespaced form: client.labels.remove(...)

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