curl --request PUT \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/webhooks/{type} \
--header 'Content-Type: application/json' \
--data '
{
"value": "https://example.com/wabox/received"
}
'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({value: 'https://example.com/wabox/received'})
};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/webhooks/{type}', 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}/webhooks/{type}"
payload = { "value": "https://example.com/wabox/received" }
headers = {"Content-Type": "application/json"}
response = requests.put(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}/webhooks/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'value' => 'https://example.com/wabox/received'
]),
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}/webhooks/{type}"
payload := strings.NewReader("{\n \"value\": \"https://example.com/wabox/received\"\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"use_workspace_webhooks": false,
"received_url": "https://example.com/wabox/received",
"delivery_url": "https://example.com/wabox/delivery",
"message_status_url": "https://example.com/wabox/message-status",
"connected_url": "https://example.com/wabox/connected",
"disconnected_url": "https://example.com/wabox/disconnected",
"chat_presence_url": null,
"single_url_enabled": false,
"single_url": null,
"notify_sent_by_me": false,
"ignore_groups": false,
"ignore_private": false,
"ignore_text": false,
"ignore_image": false,
"ignore_video": false,
"ignore_audio": false,
"ignore_document": false,
"ignore_received_callback": false,
"ignore_delivery_callback": false,
"ignore_message_status_callback": false,
"ignore_connected_callback": false,
"ignore_disconnected_callback": false,
"ignore_chat_presence_callback": false,
"secret": "whsec_9f8e7d6c5b4a39281706f5e4d3c2b1a0"
}{
"error": {
"code": "instance_not_found",
"message": "Instance not found or invalid token"
}
}type ∈ received | delivery | message_status | connected | disconnected | chat_presence. Body: { "value": "https://..." } (null para desativar). Retorna a configuração completa de webhooks.
curl --request PUT \
--url https://api.wabox.me/instances/{instance_id}/token/{token}/webhooks/{type} \
--header 'Content-Type: application/json' \
--data '
{
"value": "https://example.com/wabox/received"
}
'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({value: 'https://example.com/wabox/received'})
};
fetch('https://api.wabox.me/instances/{instance_id}/token/{token}/webhooks/{type}', 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}/webhooks/{type}"
payload = { "value": "https://example.com/wabox/received" }
headers = {"Content-Type": "application/json"}
response = requests.put(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}/webhooks/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'value' => 'https://example.com/wabox/received'
]),
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}/webhooks/{type}"
payload := strings.NewReader("{\n \"value\": \"https://example.com/wabox/received\"\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"use_workspace_webhooks": false,
"received_url": "https://example.com/wabox/received",
"delivery_url": "https://example.com/wabox/delivery",
"message_status_url": "https://example.com/wabox/message-status",
"connected_url": "https://example.com/wabox/connected",
"disconnected_url": "https://example.com/wabox/disconnected",
"chat_presence_url": null,
"single_url_enabled": false,
"single_url": null,
"notify_sent_by_me": false,
"ignore_groups": false,
"ignore_private": false,
"ignore_text": false,
"ignore_image": false,
"ignore_video": false,
"ignore_audio": false,
"ignore_document": false,
"ignore_received_callback": false,
"ignore_delivery_callback": false,
"ignore_message_status_callback": false,
"ignore_connected_callback": false,
"ignore_disconnected_callback": false,
"ignore_chat_presence_callback": false,
"secret": "whsec_9f8e7d6c5b4a39281706f5e4d3c2b1a0"
}{
"error": {
"code": "instance_not_found",
"message": "Instance not found or invalid token"
}
}Path Parameters
Id da instância (dashboard › instância › Credenciais).
Token da instância. Trate como senha.
Tipo do webhook.
received, delivery, message_status, connected, disconnected, chat_presence Body
Response
Configuração de webhooks após a alteração.
true = usa as URLs e filtros do workspace (painel › Webhooks) e ignora os campos abaixo; o secret é sempre da instância.
URL http(s) ou null (desligado).
URL http(s) ou null (desligado).
URL http(s) ou null (desligado).
URL http(s) ou null (desligado).
URL http(s) ou null (desligado).
URL http(s) ou null (desligado).
true = todos os eventos vão para single_url; as *_url por tipo são ignoradas.
URL única para todos os eventos (quando single_url_enabled).
Chave HMAC do header X-Wabox-Signature quando a instância usa a própria configuração; null = entregas não assinadas. Herdando do workspace (use_workspace_webhooks), as entregas usam o secret do workspace.