Obtener entrega del webhook de línea
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 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 la 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 de /v1/phone-lines aceptan solo una clave con alcance de tenant: los webhooks de líneas telefónicas pertenecen al workspace, no a un número de WhatsApp, por lo que una clave con alcance de número (o una autorización OAuth por número) recibe 403 NUMBER_SCOPE_NOT_ALLOWED antes de que se evalúe cualquier rol. Un 403 PERMISSION_DENIED / WORKSPACE_MEMBERSHIP_REQUIRED se envía con Cache-Control: no-store.
Estos son los webhooks de líneas telefónicas, un registro separado de /v1/webhooks: reciben solo eventos phone_line.*, y un webhook de número nunca recibe ninguno.
Requiere una clave con alcance de tenant.
curl --request GET \
--url https://pilotstatus.com.br/v1/phone-lines/webhooks/{id}/deliveries/{deliveryId} \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/phone-lines/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/phone-lines/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/phone-lines/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/phone-lines/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/phone-lines/webhooks/{id}/deliveries/{deliveryId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/phone-lines/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\"}}"
}
}payload puede contener un código de activación, que es una credencial: quien lo tenga puede registrar una cuenta de WhatsApp en la línea. No comparta ni registre esta respuesta en logs. Consulte Webhooks de líneas telefónicas.Encabezados
Parámetros de ruta
¿Esta página le ayudó?
curl --request GET \
--url https://pilotstatus.com.br/v1/phone-lines/webhooks/{id}/deliveries/{deliveryId} \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/phone-lines/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/phone-lines/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/phone-lines/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/phone-lines/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/phone-lines/webhooks/{id}/deliveries/{deliveryId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/phone-lines/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\"}}"
}
}