Listar etiquetas
curl --request GET \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/labelsconst options = {method: 'GET'};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/labels', 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}/labels"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/instances/{instance_id}/token/{token}/labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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}/labels"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"id": "1724155200000",
"name": "Novo cliente",
"color": 3,
"chats": [
"5511988887777",
"120363012345678901-group"
]
},
{
"id": "2",
"name": "Pagamento pendente",
"color": 7,
"chats": []
}
]
}{
"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"
}
}Todas as etiquetas com os chats (telefones / ids de grupo) que as carregam. Etiquetas só existem em contas WhatsApp Business. As mudanças são refletidas no celular. A primeira chamada após a instância (re)iniciar dispara uma sincronização das etiquetas com o WhatsApp e pode responder 502 action_failed se ela ainda não terminou — repita em alguns segundos. Imediata: exige a instância conectada (caso contrário, 409 instance_not_connected).
GET
/
instances
/
{instance_id}
/
token
/
{token}
/
labels
Listar etiquetas
curl --request GET \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/labelsconst options = {method: 'GET'};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/labels', 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}/labels"
response = requests.get(url)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wabox.me/instances/{instance_id}/token/{token}/labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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}/labels"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"id": "1724155200000",
"name": "Novo cliente",
"color": 3,
"chats": [
"5511988887777",
"120363012345678901-group"
]
},
{
"id": "2",
"name": "Pagamento pendente",
"color": 7,
"chats": []
}
]
}{
"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"
}
}