Overview
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.
Esempi
Copia, incolla, sostituisci i segnaposto: questi esempi chiamano l'API di produzione così come sono.
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 channelimport 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);
});