Obtener entrega del webhook del espacio de trabajo
Webhooks del workspace: el mismo registro que /v1/phone-lines/webhooks (mismas filas, secreto plwh_, firma, reintentos y entregas), con un conjunto de eventos más amplio: todos los eventos phone_line.* más wallet.topup_paid (se acreditó una recarga de la billetera). "*" significa solo todos los eventos de líneas telefónicas: wallet.topup_paid es opcional, inclúyelo por nombre (por ejemplo ["*", "wallet.topup_paid"]). Esta superficie lista todos los webhooks del workspace. Clave con alcance de tenant (o clave de cuenta con x-workspace-id); Owner o Admin (phone_lines:webhooks) con una credencial de usuario.
Devuelve { "delivery": { … } }: los campos de la lista más durationMs y responseBody del último intento, y payload, el cuerpo exacto que se envió por POST y se firmó, como string JSON, para que puedas comprobar tu código de firma con él. ⚠️ Un payload de phone_line.code_received lleva el código de activación, una credencial: la respuesta se envía con Cache-Control: private, no-store, no lo registres en logs. Una entrega de otro webhook o workspace, o un id desconocido, responde 404 WEBHOOK_DELIVERY_NOT_FOUND.
Permisos: con una clave de cuenta (ps_account_) o un token OAuth / MCP, el usuario debe ser Owner o Admin (phone_lines:webhooks); de lo contrario, 403 PERMISSION_DENIED.
Todos los endpoints /v1/workspace/webhooks aceptan solo una clave con alcance de tenant: los webhooks del workspace pertenecen al workspace, no a un número de WhatsApp, así que una clave con alcance de número (o una concesión OAuth por número) recibe 403 NUMBER_SCOPE_NOT_ALLOWED antes de que se consulte cualquier rol. Un 403 PERMISSION_DENIED / WORKSPACE_MEMBERSHIP_REQUIRED se envía con Cache-Control: no-store.
Estos son los webhooks del workspace, un registro separado de /v1/webhooks: reciben los eventos phone_line.* y wallet.topup_paid, y un webhook de número nunca recibe ninguno de ellos.
Requiere una clave con alcance de tenant.
curl --request GET \
--url https://pilotstatus.com.br/v1/workspace/webhooks/{id}/deliveries/{deliveryId} \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/workspace/webhooks/{id}/deliveries/{deliveryId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/workspace/webhooks/{id}/deliveries/{deliveryId}', 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/workspace/webhooks/{id}/deliveries/{deliveryId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/workspace/webhooks/{id}/deliveries/{deliveryId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/v1/workspace/webhooks/{id}/deliveries/{deliveryId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/workspace/webhooks/{id}/deliveries/{deliveryId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"delivery": {
"id": "cmh1w9c4m0002dl8example5f",
"event": "phone_line.code_received",
"status": "DELIVERED",
"attempts": 1,
"responseStatus": 200,
"lastError": null,
"createdAt": "2026-10-27T14:11:51.000Z",
"deliveredAt": "2026-10-27T14:11:52.000Z",
"durationMs": 184,
"responseBody": "ok",
"payload": "{\"id\":\"cmh1w9c4m0002dl8example5f\",\"event\":\"phone_line.code_received\",\"createdAt\":\"2026-10-27T14:11:51.000Z\",\"data\":{\"lineId\":\"cmg5k2l1n0001pl8example9x\",\"number\":\"551148637200\",\"name\":\"Suporte SP\",\"activationId\":\"cmg5k3a7c0002ac8example4q\",\"code\":\"123456\",\"failureReason\":null,\"audioUrl\":\"https://pilotstatus.com.br/v1/phone-lines/activations/cmg5k3a7c0002ac8example4q/audio\"}}"
}
}Encabezados
Parámetros de ruta
¿Esta página le ayudó?
curl --request GET \
--url https://pilotstatus.com.br/v1/workspace/webhooks/{id}/deliveries/{deliveryId} \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/workspace/webhooks/{id}/deliveries/{deliveryId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/workspace/webhooks/{id}/deliveries/{deliveryId}', 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/workspace/webhooks/{id}/deliveries/{deliveryId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/workspace/webhooks/{id}/deliveries/{deliveryId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/v1/workspace/webhooks/{id}/deliveries/{deliveryId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/workspace/webhooks/{id}/deliveries/{deliveryId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"delivery": {
"id": "cmh1w9c4m0002dl8example5f",
"event": "phone_line.code_received",
"status": "DELIVERED",
"attempts": 1,
"responseStatus": 200,
"lastError": null,
"createdAt": "2026-10-27T14:11:51.000Z",
"deliveredAt": "2026-10-27T14:11:52.000Z",
"durationMs": 184,
"responseBody": "ok",
"payload": "{\"id\":\"cmh1w9c4m0002dl8example5f\",\"event\":\"phone_line.code_received\",\"createdAt\":\"2026-10-27T14:11:51.000Z\",\"data\":{\"lineId\":\"cmg5k2l1n0001pl8example9x\",\"number\":\"551148637200\",\"name\":\"Suporte SP\",\"activationId\":\"cmg5k3a7c0002ac8example4q\",\"code\":\"123456\",\"failureReason\":null,\"audioUrl\":\"https://pilotstatus.com.br/v1/phone-lines/activations/cmg5k3a7c0002ac8example4q/audio\"}}"
}
}