# Configurazione del webhook

> Configura BroadNet per inviare in POST ricevute di consegna (DLR) e messaggi in entrata (MO) al tuo URL HTTPS. Segui lo stato finale di ogni messaggio senza polling. Rispondi rapidamente con HTTP 200 ed elabora in modo asincrono.

- URL canonico: https://www.broadnet.me/it/developers/webhooks
- Lingua: it
- Ultimo aggiornamento: 2026-10-21
- Editore: BroadNet (https://www.broadnet.me)

BroadNet invia lo stato di consegna URL webhook configurato sul tuo account man mano che ogni messaggio completa il suo ciclo di vita. Puoi anche effettuare un polling: GET /whatsapp/message/bulk-insights restituisce lo stato di ogni destinatario WhatsApp in un batch, e GET /sms/list restituisce il numero di messaggi elaborati e in sospeso per i processi di invio massivo SMS.

> **Rispondi subito, lavora dopo** Rispondi a ogni richiesta POST del webhook con un codice 2xx non appena l'hai memorizzata, quindi elaborala in modo asincrono. Assicurati che il tuo gestore sia sicuro da eseguire due volte per lo stesso aggiornamento.

## Esempi

### message statuses

```text
SUBMITTED   accepted by BroadNet, queued for the network
SENT        handed to the operator or channel
DELIVERED   confirmed on the handset
READ        opened by the recipient (channels that report reads, e.g. WhatsApp)
FAILED      not delivered
REJECTED    refused by the operator or channel
```

### webhook.ts

```typescript
import express from "express";

const app = express();

app.post("/webhooks/broadnet", express.json(), async (req, res) => {
  // Store the raw status update first, then acknowledge.
  // Field names per channel are in the OpenAPI spec.
  await db.statusUpdates.insert({ receivedAt: new Date(), body: req.body });
  res.sendStatus(200);
});
```

Gestore a scopo illustrativo. I campi del payload variano a seconda del canale; consultare le specifiche OpenAPI.

## Correlati

- [Standard di consegna e affidabilità del webhook](https://www.broadnet.me/it/reference/webhook-delivery-and-reliability)
