Skip to main content

Labels

Labels are a WhatsApp Business feature that lets you categorize and organize your chats. Through the Wappfy API, you can create custom labels, assign them to chats, and retrieve chats by label.
Labels are only available on WhatsApp Business accounts. Personal WhatsApp accounts do not support labels.
All label endpoints are scoped to a specific instance:

Create a Label

Create a new label with a name and color.
Response:

Label Colors

WhatsApp Business supports a fixed set of label colors identified by number:

List Labels

Retrieve all labels for the instance.
Response:

Update a Label

Update an existing label’s name or color.

Delete a Label

Permanently delete a label. This removes the label from all chats it was assigned to.
Deleting a label removes it from all associated chats. This action cannot be undone.

Chat Labels

Get Labels for a Chat

Retrieve all labels assigned to a specific chat.
Response:

Set Labels on a Chat

Assign one or more labels to a chat. This replaces any existing labels on the chat.
To remove all labels from a chat, pass an empty array: {"label_ids": []}.

Get Chats by Label

Retrieve all chats that have a specific label assigned.
Response:

Common Use Cases

Use a webhook to listen for message.received events. When a message comes from an unknown contact, assign the “New Lead” label via the API. This helps your team quickly identify and prioritize new conversations.
Create labels like “Open”, “In Progress”, and “Resolved”. Update the label as your team works through support requests. Use the “Get Chats by Label” endpoint to build a simple support queue.
Label customers by category (e.g., “VIP”, “Wholesale”, “Retail”). When sending broadcast messages, fetch all chats for a label and send messages in a loop.

Endpoint Reference


Error Handling