Retirer une étiquette d’une conversation
curl --request POST \
--url https://api.wachap.com/v1/whatsapp/labels/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "account_123",
"labelId": "label_vip",
"phone": "+2290100000000"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({accountId: 'account_123', labelId: 'label_vip', phone: '+2290100000000'})
};
fetch('https://api.wachap.com/v1/whatsapp/labels/remove', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({accountId: 'account_123', labelId: 'label_vip', phone: '+2290100000000'})
};
fetch('https://api.wachap.com/v1/whatsapp/labels/remove', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wachap.com/v1/whatsapp/labels/remove"
payload = {
"accountId": "account_123",
"labelId": "label_vip",
"phone": "+2290100000000"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wachap.com/v1/whatsapp/labels/remove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => 'account_123',
'labelId' => 'label_vip',
'phone' => '+2290100000000'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wachap.com/v1/whatsapp/labels/remove"
payload := strings.NewReader("{\n \"accountId\": \"account_123\",\n \"labelId\": \"label_vip\",\n \"phone\": \"+2290100000000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"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
Retirer une étiquette
Retirez une étiquette d’une conversation WhatsApp
POST
/
whatsapp
/
labels
/
remove
Retirer une étiquette d’une conversation
curl --request POST \
--url https://api.wachap.com/v1/whatsapp/labels/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "account_123",
"labelId": "label_vip",
"phone": "+2290100000000"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({accountId: 'account_123', labelId: 'label_vip', phone: '+2290100000000'})
};
fetch('https://api.wachap.com/v1/whatsapp/labels/remove', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({accountId: 'account_123', labelId: 'label_vip', phone: '+2290100000000'})
};
fetch('https://api.wachap.com/v1/whatsapp/labels/remove', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wachap.com/v1/whatsapp/labels/remove"
payload = {
"accountId": "account_123",
"labelId": "label_vip",
"phone": "+2290100000000"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wachap.com/v1/whatsapp/labels/remove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountId' => 'account_123',
'labelId' => 'label_vip',
'phone' => '+2290100000000'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wachap.com/v1/whatsapp/labels/remove"
payload := strings.NewReader("{\n \"accountId\": \"account_123\",\n \"labelId\": \"label_vip\",\n \"phone\": \"+2290100000000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"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
/v1/whatsapp/labels/remove
Body Parameters
Identifiant du compte WhatsApp.
Identifiant de l’étiquette à retirer. Fournissez
labelId ou labelName.Nom d’une étiquette existante lorsque son identifiant n’est pas connu.
JID complet de la conversation. Fournissez
conversationJid ou phone.Numéro au format international lorsque le JID n’est pas connu.
Exemple
curl -X POST https://api.wachap.com/v1/whatsapp/labels/remove \
-H "Authorization: Bearer token" \
-H "Content-Type: application/json" \
-d '{
"accountId": "account_123",
"labelId": "label_vip",
"phone": "+2290100000000"
}'
assignment avec labeled: false.Autorisations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Corps
application/json
⌘I
