Etiquetar um chat
curl --request PUT \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/chats/{phone}/labels/{id}const options = {method: 'PUT'};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/chats/{phone}/labels/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wabox.me/instances/{instance_id}/token/{token}/chats/{phone}/labels/{id}"
response = requests.put(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/instances/{instance_id}/token/{token}/chats/{phone}/labels/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.wabox.me/instances/{instance_id}/token/{token}/chats/{phone}/labels/{id}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"updated": true
}{
"error": {
"code": "instance_not_found",
"message": "Instance not found or invalid token"
}
}{
"error": {
"code": "subscription_required",
"message": "Trial expired or subscription inactive. Subscribe in the dashboard to keep sending."
}
}{
"error": {
"code": "instance_not_connected",
"message": "Instance is not connected"
}
}phone pode ser um usuário ou um id de grupo. Responde 404 label_not_found se a etiqueta não existe. Etiquetas só existem em contas WhatsApp Business. As mudanças são refletidas no celular. Imediata: exige a instância conectada (caso contrário, 409 instance_not_connected).
PUT
/
instances
/
{instance_id}
/
token
/
{token}
/
chats
/
{phone}
/
labels
/
{id}
Etiquetar um chat
curl --request PUT \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/chats/{phone}/labels/{id}const options = {method: 'PUT'};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/chats/{phone}/labels/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wabox.me/instances/{instance_id}/token/{token}/chats/{phone}/labels/{id}"
response = requests.put(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/instances/{instance_id}/token/{token}/chats/{phone}/labels/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.wabox.me/instances/{instance_id}/token/{token}/chats/{phone}/labels/{id}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"updated": true
}{
"error": {
"code": "instance_not_found",
"message": "Instance not found or invalid token"
}
}{
"error": {
"code": "subscription_required",
"message": "Trial expired or subscription inactive. Subscribe in the dashboard to keep sending."
}
}{
"error": {
"code": "instance_not_connected",
"message": "Instance is not connected"
}
}Path Parameters
Id da instância (dashboard › instância › Credenciais).
Token da instância. Trate como senha.
Telefone ou id de grupo (120363012345678901-group).
Example:
"5511988887777"
Id da etiqueta (o id da listagem).
Example:
"1724155200000"
Response
Etiqueta aplicada ao chat.