Listar entregas
/v1/webhooks/{wid}/deliveriesdesde M3token da instância ou adminQuando usar
Entregas do webhook, mais recentes primeiro, com tentativas, último status HTTP, último erro e o evento completo. ?status=failed é a dead-letter: entregas que ficaram 24 horas sem sucesso. Entregas concluídas ficam 7 dias e a dead-letter 30 dias (configurável).
Autenticação
Aceita o token da instância (só a própria instância) ou o token admin. Um token de outra instância recebe 403 forbidden (ou 404 not_found em webhooks de outra instância).
Parâmetros
Caminho
| Nome | Tipo | Descrição |
|---|---|---|
widobrigatório | string | Id do webhook (wh_...). |
Query
| Nome | Tipo | Descrição |
|---|---|---|
status | "pending" | "delivered" | "failed" | pending, delivered ou failed. Omitido: todas. |
limit | integer | Itens por página. Padrão 50, máximo 100. (padrão 50) |
cursor | string | next_cursor da página anterior (opaco). |
Exemplo
curl -s "$LITEZAP_URL/v1/webhooks/$WEBHOOK_ID/deliveries?status=failed" \ -H "Authorization: Bearer $LITEZAP_TOKEN"const res = await fetch("http://localhost:8787/v1/webhooks/wh_3c7e1a9f5b2d4806/deliveries?status=failed", { headers: { Authorization: `Bearer ${process.env.LITEZAP_TOKEN}` },});console.log(res.status, res.status === 204 ? "" : await res.json());import osimport requests
r = requests.get( "http://localhost:8787/v1/webhooks/wh_3c7e1a9f5b2d4806/deliveries", headers={"Authorization": f"Bearer {os.environ['LITEZAP_TOKEN']}"}, params={ "status": "failed", }, timeout=150,)print(r.status_code, r.json() if r.content else "")package main
import ( "fmt" "io" "net/http" "os")
func main() { req, _ := http.NewRequest("GET", "http://localhost:8787/v1/webhooks/wh_3c7e1a9f5b2d4806/deliveries?status=failed", nil) req.Header.Set("Authorization", "Bearer "+os.Getenv("LITEZAP_TOKEN")) resp, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer resp.Body.Close() out, _ := io.ReadAll(resp.Body) fmt.Println(resp.Status, string(out))}<?phprequire 'vendor/autoload.php'; // composer require guzzlehttp/guzzle
$client = new GuzzleHttp\Client(['base_uri' => 'http://localhost:8787']);$res = $client->request('GET', '/v1/webhooks/wh_3c7e1a9f5b2d4806/deliveries', [ 'headers' => ['Authorization' => 'Bearer ' . getenv('LITEZAP_TOKEN')], 'query' => [ 'status' => 'failed', ], 'http_errors' => false,]);echo $res->getStatusCode(), ' ', $res->getBody(), PHP_EOL;Nos exemplos, LITEZAP_URL é a URL base (ex.: http://localhost:8787) e o token vem deLITEZAP_TOKEN (instância) ou LITEZAP_ADMIN_TOKEN.
Resposta
200 Uma página de entregas.
Campos de DeliveryPage
deliveries | Delivery[] | |
next_cursor | string |
{ "deliveries": [ { "id": "dlv_8b1f4e2a6c9d3075", "webhook_id": "wh_3c7e1a9f5b2d4806", "event_id": "evt_5f2c9a1b7d3e4f60", "event_type": "message.received", "instance_id": "inst_7f3a9c2e5b1d4086", "status": "failed", "attempts": 19, "expires_at": "2026-10-18T14:02:11Z", "last_status_code": 503, "last_error": "http 503", "created_at": "2026-10-17T14:02:11Z", "updated_at": "2026-10-18T14:02:11Z", "event": { "id": "evt_5f2c9a1b7d3e4f60", "type": "message.received", "version": 1, "instance_id": "inst_7f3a9c2e5b1d4086", "timestamp": "2026-10-17T14:02:11.204Z", "data": { "id": "msg_e29d4b8a0f6c1357", "chat": "5511999999999@s.whatsapp.net", "from_me": false, "source": "contact", "type": "text", "text": "Oi!", "timestamp": "2026-10-17T14:02:10Z" } } } ], "next_cursor": "eyJzIjo0Mn0"}Erros
| Código | HTTP | Retentável | O que fazer |
|---|---|---|---|
validation_failed | 400 | não | Corrija o corpo ou os parâmetros; a message diz o campo. |
unauthorized | 401 | não | Envie Authorization: Bearer <token> válido. |
not_found | 404 | não | Confira o id do recurso (mensagem, chat, contato, mídia ou webhook). |
Todo erro usa o envelope {"error":{"code","message","retryable"}}. Tabela completa em Erros.
Equivalente na Z-API: (sem equivalente). Veja Migrar da Z-API.
Outras operações de Webhooks: Listar webhooks · Criar webhook · Consultar webhook · Atualizar webhook · Apagar webhook · Reenviar entrega

