Create webhook
Creates a webhook subscribed to ONE WhatsApp number. The number comes from the key scope (number key), the x-whatsapp-number-id header or the whatsappNumberId body field — if the body contradicts the key scope → 400 NUMBER_MISMATCH; no resolvable number → 400 NUMBER_REQUIRED; another tenant’s number → 404 NUMBER_NOT_FOUND. events picks what gets delivered: an empty/omitted list dispatches NOTHING (there is no implicit “subscribe to all”; use ”*” for all) and events the number’s provider cannot emit are silently dropped. The signing secret is NEVER returned.
curl --request POST \
--url https://pilotstatus.com.br/v1/webhooks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "https://hooks.acme.com/whatsapp",
"name": "n8n",
"events": [
"message.received",
"message.delivered"
],
"whatsappNumberId": "num_01HZX..."
}
'import requests
url = "https://pilotstatus.com.br/v1/webhooks"
payload = {
"url": "https://hooks.acme.com/whatsapp",
"name": "n8n",
"events": ["message.received", "message.delivered"],
"whatsappNumberId": "num_01HZX..."
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://hooks.acme.com/whatsapp',
name: 'n8n',
events: ['message.received', 'message.delivered'],
whatsappNumberId: 'num_01HZX...'
})
};
fetch('https://pilotstatus.com.br/v1/webhooks', 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",
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([
'url' => 'https://hooks.acme.com/whatsapp',
'name' => 'n8n',
'events' => [
'message.received',
'message.delivered'
],
'whatsappNumberId' => 'num_01HZX...'
]),
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"
payload := strings.NewReader("{\n \"url\": \"https://hooks.acme.com/whatsapp\",\n \"name\": \"n8n\",\n \"events\": [\n \"message.received\",\n \"message.delivered\"\n ],\n \"whatsappNumberId\": \"num_01HZX...\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://pilotstatus.com.br/v1/webhooks")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://hooks.acme.com/whatsapp\",\n \"name\": \"n8n\",\n \"events\": [\n \"message.received\",\n \"message.delivered\"\n ],\n \"whatsappNumberId\": \"num_01HZX...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://hooks.acme.com/whatsapp\",\n \"name\": \"n8n\",\n \"events\": [\n \"message.received\",\n \"message.delivered\"\n ],\n \"whatsappNumberId\": \"num_01HZX...\"\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": true,
"events": [
"message.received"
],
"createdAt": "2026-07-03T12:00:00.000Z",
"updatedAt": "2026-07-03T12:00:00.000Z"
}{
"error": "Validation error"
}{
"error": "Unauthorized"
}{
"error": "Too many requests"
}Authorizations
Your ps_ API key
Headers
Scopes to a single number (required for per-number OAuth grants).
Body
HTTPS endpoint that will receive the events.
"https://hooks.acme.com/whatsapp"
Display name (default: the URL hostname).
"n8n"
Events to subscribe to (e.g. ["message.received"]); "*" = all. Empty/omitted = dispatches nothing.
["message.received", "message.delivered"]
Target number — only needed with a tenant key and no number header; with a number key it must match the scope (400 NUMBER_MISMATCH).
"num_01HZX..."
Response
Create webhook
Was this page helpful?
curl --request POST \
--url https://pilotstatus.com.br/v1/webhooks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "https://hooks.acme.com/whatsapp",
"name": "n8n",
"events": [
"message.received",
"message.delivered"
],
"whatsappNumberId": "num_01HZX..."
}
'import requests
url = "https://pilotstatus.com.br/v1/webhooks"
payload = {
"url": "https://hooks.acme.com/whatsapp",
"name": "n8n",
"events": ["message.received", "message.delivered"],
"whatsappNumberId": "num_01HZX..."
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://hooks.acme.com/whatsapp',
name: 'n8n',
events: ['message.received', 'message.delivered'],
whatsappNumberId: 'num_01HZX...'
})
};
fetch('https://pilotstatus.com.br/v1/webhooks', 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",
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([
'url' => 'https://hooks.acme.com/whatsapp',
'name' => 'n8n',
'events' => [
'message.received',
'message.delivered'
],
'whatsappNumberId' => 'num_01HZX...'
]),
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"
payload := strings.NewReader("{\n \"url\": \"https://hooks.acme.com/whatsapp\",\n \"name\": \"n8n\",\n \"events\": [\n \"message.received\",\n \"message.delivered\"\n ],\n \"whatsappNumberId\": \"num_01HZX...\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://pilotstatus.com.br/v1/webhooks")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://hooks.acme.com/whatsapp\",\n \"name\": \"n8n\",\n \"events\": [\n \"message.received\",\n \"message.delivered\"\n ],\n \"whatsappNumberId\": \"num_01HZX...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://hooks.acme.com/whatsapp\",\n \"name\": \"n8n\",\n \"events\": [\n \"message.received\",\n \"message.delivered\"\n ],\n \"whatsappNumberId\": \"num_01HZX...\"\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": true,
"events": [
"message.received"
],
"createdAt": "2026-07-03T12:00:00.000Z",
"updatedAt": "2026-07-03T12:00:00.000Z"
}{
"error": "Validation error"
}{
"error": "Unauthorized"
}{
"error": "Too many requests"
}