curl --request POST \
--url https://api.wachap.com/v1/whatsapp/labels/apply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "account_123",
"labelId": "label_vip",
"phone": "+2290100000000"
}
'{
"success": true,
"label": {
"id": "<string>",
"userId": "<string>",
"accountId": "<string>",
"labelId": "<string>",
"name": "<string>",
"color": 123,
"deleted": true,
"createdAt": "<string>",
"updatedAt": "<string>",
"syncedAt": "<string>",
"fromSync": true,
"source": "<string>"
},
"assignment": {
"accountId": "<string>",
"labelId": "<string>",
"conversationJid": "<string>",
"phone": "<string>",
"labeled": true,
"updatedAt": "<string>",
"syncedAt": "<string>",
"fromSync": true,
"source": "<string>"
}
}Étiquettes WhatsApp
Appliquer une étiquette
Associez une étiquette à une conversation WhatsApp
POST
/
whatsapp
/
labels
/
apply
curl --request POST \
--url https://api.wachap.com/v1/whatsapp/labels/apply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "account_123",
"labelId": "label_vip",
"phone": "+2290100000000"
}
'{
"success": true,
"label": {
"id": "<string>",
"userId": "<string>",
"accountId": "<string>",
"labelId": "<string>",
"name": "<string>",
"color": 123,
"deleted": true,
"createdAt": "<string>",
"updatedAt": "<string>",
"syncedAt": "<string>",
"fromSync": true,
"source": "<string>"
},
"assignment": {
"accountId": "<string>",
"labelId": "<string>",
"conversationJid": "<string>",
"phone": "<string>",
"labeled": true,
"updatedAt": "<string>",
"syncedAt": "<string>",
"fromSync": true,
"source": "<string>"
}
}Endpoint
Body Parameters
Crée l’étiquette
labelName si elle n’existe pas. Ce champ est facultatif et vaut false par défaut.Exemple avec création automatique
curl -X POST https://api.wachap.com/v1/whatsapp/labels/apply \
-H "Authorization: Bearer token" \
-H "Content-Type: application/json" \
-d '{
"accountId": "account_123",
"labelName": "Nouveau prospect",
"createIfMissing": true,
"color": 3,
"phone": "+2290100000000"
}'
Réponse
{
"success": true,
"label": {
"labelId": "label_prospect",
"name": "Nouveau prospect",
"color": 3,
"deleted": false
},
"assignment": {
"accountId": "account_123",
"labelId": "label_prospect",
"conversationJid": "2290100000000@s.whatsapp.net",
"phone": "2290100000000",
"labeled": true,
"source": "api"
}
}
Autorisations
Corps
application/json
