Webhooks
Atualizar webhook
Atualiza um webhook: qualquer subconjunto de name, url, active (false pausa as entregas sem apagar) e events. events SUBSTITUI a lista completa de assinaturas — lista vazia = não dispara nada; ”*” = todos; eventos que o provedor do número não emite são descartados. O número do webhook NÃO pode ser trocado pela API pública (400 NUMBER_RESCOPE_NOT_SUPPORTED) — apague e recrie. 404 se não for visível para a key. O segredo NUNCA é retornado.
PATCH
/
v1
/
webhooks
/
{id}
Atualizar webhook
curl --request PATCH \
--url https://pilotstatus.com.br/v1/webhooks/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "n8n-prod",
"url": "https://hooks.acme.com/whatsapp-v2",
"active": "false",
"events": [
"message.received"
]
}
'import requests
url = "https://pilotstatus.com.br/v1/webhooks/{id}"
payload = {
"name": "n8n-prod",
"url": "https://hooks.acme.com/whatsapp-v2",
"active": "false",
"events": ["message.received"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'n8n-prod',
url: 'https://hooks.acme.com/whatsapp-v2',
active: 'false',
events: ['message.received']
})
};
fetch('https://pilotstatus.com.br/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pilotstatus.com.br/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'n8n-prod',
'url' => 'https://hooks.acme.com/whatsapp-v2',
'active' => 'false',
'events' => [
'message.received'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://pilotstatus.com.br/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"name\": \"n8n-prod\",\n \"url\": \"https://hooks.acme.com/whatsapp-v2\",\n \"active\": \"false\",\n \"events\": [\n \"message.received\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.patch("https://pilotstatus.com.br/v1/webhooks/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"n8n-prod\",\n \"url\": \"https://hooks.acme.com/whatsapp-v2\",\n \"active\": \"false\",\n \"events\": [\n \"message.received\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"n8n-prod\",\n \"url\": \"https://hooks.acme.com/whatsapp-v2\",\n \"active\": \"false\",\n \"events\": [\n \"message.received\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "wh_01HZX...",
"tenantId": "tenant_01HZX...",
"name": "n8n",
"url": "https://hooks.acme.com/whatsapp",
"environment": "LIVE",
"active": false,
"events": [
"message.received",
"message.delivered"
],
"createdAt": "2026-06-01T11:59:00.000Z",
"updatedAt": "2026-07-03T12:05:00.000Z"
}{
"error": "Validation error"
}{
"error": "Unauthorized"
}{
"error": "Too many requests"
}Autorizações
apiKeyapiKeyId
Sua chave de API ps_
Cabeçalhos
Restringe ao contexto de um número (obrigatório em concessões OAuth por número).
Parâmetros de caminho
Id do webhook.
Corpo
application/json
Resposta
Pausar entregas
Esta página foi útil?
⌘I
Atualizar webhook
curl --request PATCH \
--url https://pilotstatus.com.br/v1/webhooks/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "n8n-prod",
"url": "https://hooks.acme.com/whatsapp-v2",
"active": "false",
"events": [
"message.received"
]
}
'import requests
url = "https://pilotstatus.com.br/v1/webhooks/{id}"
payload = {
"name": "n8n-prod",
"url": "https://hooks.acme.com/whatsapp-v2",
"active": "false",
"events": ["message.received"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'n8n-prod',
url: 'https://hooks.acme.com/whatsapp-v2',
active: 'false',
events: ['message.received']
})
};
fetch('https://pilotstatus.com.br/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pilotstatus.com.br/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'n8n-prod',
'url' => 'https://hooks.acme.com/whatsapp-v2',
'active' => 'false',
'events' => [
'message.received'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://pilotstatus.com.br/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"name\": \"n8n-prod\",\n \"url\": \"https://hooks.acme.com/whatsapp-v2\",\n \"active\": \"false\",\n \"events\": [\n \"message.received\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.patch("https://pilotstatus.com.br/v1/webhooks/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"n8n-prod\",\n \"url\": \"https://hooks.acme.com/whatsapp-v2\",\n \"active\": \"false\",\n \"events\": [\n \"message.received\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"n8n-prod\",\n \"url\": \"https://hooks.acme.com/whatsapp-v2\",\n \"active\": \"false\",\n \"events\": [\n \"message.received\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "wh_01HZX...",
"tenantId": "tenant_01HZX...",
"name": "n8n",
"url": "https://hooks.acme.com/whatsapp",
"environment": "LIVE",
"active": false,
"events": [
"message.received",
"message.delivered"
],
"createdAt": "2026-06-01T11:59:00.000Z",
"updatedAt": "2026-07-03T12:05:00.000Z"
}{
"error": "Validation error"
}{
"error": "Unauthorized"
}{
"error": "Too many requests"
}