cURL
curl --request POST \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/groups/{id}/participants \
--header 'Content-Type: application/json' \
--data '
{
"action": "add",
"phones": [
"5511977776666",
"5511900000000"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({action: 'add', phones: ['5511977776666', '5511900000000']})
};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/groups/{id}/participants', 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}/groups/{id}/participants"
payload = {
"action": "add",
"phones": ["5511977776666", "5511900000000"]
}
headers = {"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.wabox.me/instances/{instance_id}/token/{token}/groups/{id}/participants",
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([
'action' => 'add',
'phones' => [
'5511977776666',
'5511900000000'
]
]),
CURLOPT_HTTPHEADER => [
"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.wabox.me/instances/{instance_id}/token/{token}/groups/{id}/participants"
payload := strings.NewReader("{\n \"action\": \"add\",\n \"phones\": [\n \"5511977776666\",\n \"5511900000000\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"data": [
{
"phone": "5511977776666",
"ok": true
},
{
"phone": "5511900000000",
"ok": false,
"error": "403"
}
]
}{
"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"
}
}Adicionar / remover / promover / rebaixar / aprovar / rejeitar participantes
Body { "action": "add" | "remove" | "promote" | "demote" | "approve" | "reject", "phones": [...] }. Cada telefone recebe seu próprio resultado (error é o status do WhatsApp: 403 não permitido, 408 saiu recentemente, 409 já é membro…). Imediata: exige a instância conectada (caso contrário, 409 instance_not_connected).
POST
/
instances
/
{instance_id}
/
token
/
{token}
/
groups
/
{id}
/
participants
cURL
curl --request POST \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/groups/{id}/participants \
--header 'Content-Type: application/json' \
--data '
{
"action": "add",
"phones": [
"5511977776666",
"5511900000000"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({action: 'add', phones: ['5511977776666', '5511900000000']})
};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/groups/{id}/participants', 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}/groups/{id}/participants"
payload = {
"action": "add",
"phones": ["5511977776666", "5511900000000"]
}
headers = {"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.wabox.me/instances/{instance_id}/token/{token}/groups/{id}/participants",
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([
'action' => 'add',
'phones' => [
'5511977776666',
'5511900000000'
]
]),
CURLOPT_HTTPHEADER => [
"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.wabox.me/instances/{instance_id}/token/{token}/groups/{id}/participants"
payload := strings.NewReader("{\n \"action\": \"add\",\n \"phones\": [\n \"5511977776666\",\n \"5511900000000\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"data": [
{
"phone": "5511977776666",
"ok": true
},
{
"phone": "5511900000000",
"ok": false,
"error": "403"
}
]
}{
"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.
Id do grupo (<id>-group).
Example:
"120363012345678901-group"
Body
application/json
Response
Um resultado por telefone em data.
Show child attributes
Show child attributes