TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/wppconnect-team/wa-js/llms.txt
Use this file to discover all available pages before exploring further.
WPP.lists module lets you create named tabs that filter the WhatsApp chat list — the same feature exposed in the app’s own “Filters” tab bar. Lists work on both personal and WhatsApp Business accounts. When a list is active, the chat list shows only the conversations that belong to it. Unlike WPP.labels, lists are not visual tags on individual chats; they are organizational containers that produce a separate filtered view.
WPP.lists uses the same underlying LabelStore as WPP.labels, but it operates only on entries with type === 5 (WhatsApp’s internal ListType.CUSTOM). Functions do not overlap and will not interfere with Business labels.Lists vs. labels
| Feature | WPP.lists | WPP.labels |
|---|---|---|
| Account type | Personal and Business | Business only |
| Appearance | Named tab at the top of the chat list | Colored chip tags on each chat row |
| Multiple per chat | No | Yes |
| Color picker | Automatic (palette index) | Manual or automatic |
| Filters view | Yes — activates a filtered chat list | No |
WPP.lists when you need named chat list filter tabs that work regardless of account type. Use WPP.labels when you need per-chat color-coded tagging in a Business account.
Functions
create
Creates a new named list and optionally populates it with an initial set of chats. Returns the numeric string ID assigned to the new list.
Display name for the new list. Whitespace is trimmed. An empty or whitespace-only string throws
WPPError with code list_name_required.Array of chat IDs to add to the list immediately after creation. Accepts JID strings (e.g.
'15551234567@c.us') or Wid objects. Omit or pass an empty array to create an empty list.Non-negative integer index into the WhatsApp color palette. Omit to auto-assign the next available color. Passing a negative value or a non-integer throws
WPPError with code list_invalid_color.Promise<string> — the numeric string ID of the new list (e.g. '42').
list
Returns all custom lists defined for the current account. This function is synchronous.
ListInfo[] — an array of list descriptor objects (not a Promise).
Numeric string ID of the list.
Display name of the list.
Integer index into the WhatsApp color palette.
addChats
Adds one or more chats to an existing list.
Numeric string ID of the target list (e.g.
'42').Array of chat JID strings or
Wid objects to add. An empty array is a no-op.Promise<void>
Throws WPPError with code list_not_found if listId does not correspond to an existing list.
removeChats
Removes one or more chats from a list without deleting the list itself.
Numeric string ID of the list.
Array of chat JID strings or
Wid objects to remove. An empty array is a no-op.Promise<void>
Throws WPPError with code list_not_found if listId does not correspond to an existing list.
rename
Renames an existing list. The list ID and color are unchanged.
Numeric string ID of the list to rename.
New display name. Whitespace is trimmed. An empty or whitespace-only string throws
WPPError with code list_name_required.Promise<void>
Throws WPPError with code list_not_found if listId does not correspond to an existing list.
remove
Permanently deletes a list by ID. Chats that were inside the list are not affected — they remain in the main chat list.
Numeric string ID of the list to delete.
Promise<void>
Throws WPPError with code list_not_found if listId does not correspond to an existing list.
Full workflow example
The example below sets up two lists for a remote team, adds contacts to each, and later cleans up one of them.Error reference
list_name_required
list_name_required
Thrown by
create and rename when the provided name is an empty string or contains only whitespace.list_invalid_color
list_invalid_color
Thrown by
create when colorIndex is provided but is not a non-negative integer.list_not_found
list_not_found
Thrown by
addChats, removeChats, rename, and remove when the specified listId does not match any list in the local LabelStore. This typically means the list was already deleted or the ID is incorrect.