Actualizar webhook
Actualiza un webhook: cualquier subconjunto de name, url, active (false detiene las entregas sin eliminar) y events. events REEMPLAZA la lista completa de suscripciones: lista vacía = no despacha nada; "*" = todos excepto el opcional lead.received, que debe listarse por nombre; los eventos que el proveedor del número no puede emitir se descartan. Los campos desconocidos del cuerpo se ignoran. El número del webhook NO se puede cambiar mediante la API pública (400 NUMBER_RESCOPE_NOT_SUPPORTED): elimínalo y vuelve a crearlo. Reapuntar a una URL que otro webhook ya usa en el mismo número → 409 WEBHOOK_DUPLICATE. 404 WEBHOOK_NOT_FOUND si no es visible para quien llama.
Responde con la fila del webhook actualizada, sin secret, y sin hasSecret ni el estado de pausa (léelos con GET). Editar nunca cambia el secreto.
Permisos: webhooks:manage (Owner o Admin con una clave de cuenta o token OAuth/MCP).
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"
],
"deliveryTimeoutMs": 8000
}
'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"],
"deliveryTimeoutMs": 8000
}
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'],
deliveryTimeoutMs: 8000
})
};
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'
],
'deliveryTimeoutMs' => 8000
]),
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 \"deliveryTimeoutMs\": 8000\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 \"deliveryTimeoutMs\": 8000\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 \"deliveryTimeoutMs\": 8000\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",
"deliveryTimeoutMs": null,
"active": false,
"events": [
"message.received",
"message.delivered"
],
"createdAt": "2026-06-01T11:59:00.000Z",
"updatedAt": "2026-07-03T12:05:00.000Z"
}Encabezados
Cuerpo
Solo para el equipo de Pilot Status. Plazo de entrega por webhook en ms, entero 1000–15000; null lo borra (vuelve al predeterminado de 10 s). Enviar la clave en absoluto (null incluido) con cualquier otra credencial → 403 DELIVERY_TIMEOUT_STAFF_ONLY. Las claves ps_ clásicas nunca son del equipo.
1000 <= x <= 15000Respuesta
Pausar entregas
¿Esta página le ayudó?
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"
],
"deliveryTimeoutMs": 8000
}
'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"],
"deliveryTimeoutMs": 8000
}
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'],
deliveryTimeoutMs: 8000
})
};
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'
],
'deliveryTimeoutMs' => 8000
]),
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 \"deliveryTimeoutMs\": 8000\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 \"deliveryTimeoutMs\": 8000\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 \"deliveryTimeoutMs\": 8000\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",
"deliveryTimeoutMs": null,
"active": false,
"events": [
"message.received",
"message.delivered"
],
"createdAt": "2026-06-01T11:59:00.000Z",
"updatedAt": "2026-07-03T12:05:00.000Z"
}