curl --request POST \
--url https://api.wppfy.com/chat/labels \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"number": "5511999999999",
"labelids": [
"10",
"20",
"30"
]
}
'{
"response": "Labels updated successfully",
"editions": [
"Added label 10 to chat",
"Added label 20 to chat",
"Removed label 5 from chat"
]
}Labels
Manages a chat's labels
Updates the labels associated with a specific chat. This endpoint offers three modes of operation:
- Set all labels (labelids): Sets the complete set of labels for the chat, replacing existing labels
- Add a label (add_labelid): Adds a single label to the chat without affecting existing ones
- Remove a label (remove_labelid): Removes a single label from the chat without affecting the others
Important: Use only one of the three parameters per request. Nonexistent labels will be rejected.
Labels must be provided in the id or labelid format found in the get labels function.
POST
/
chat
/
labels
curl --request POST \
--url https://api.wppfy.com/chat/labels \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"number": "5511999999999",
"labelids": [
"10",
"20",
"30"
]
}
'{
"response": "Labels updated successfully",
"editions": [
"Added label 10 to chat",
"Added label 20 to chat",
"Removed label 5 from chat"
]
}Authorizations
Body
application/json
- Option 1
- Option 2
- Option 3
Chat or group number
Example:
"5511999999999"
List of label IDs to apply to the chat (sets all labels)
Example:
["10", "20"]
ID of the label to add to the chat
Example:
"10"
ID of the label to remove from the chat
Example:
"20"
