Overview
BroadNet envía el estado de entrega a la URL del webhook configurada en tu cuenta a medida que cada mensaje avanza en su ciclo de vida. También puedes realizar consultas: GET /whatsapp/message/bulk-insights devuelve el estado de cada destinatario WhatsApp en un lote, y GET /sms/list devuelve el número de mensajes procesados y pendientes para los envíos masivos SMS.
Ejemplos
Copie, pegue y sustituya los marcadores: estos ejemplos llaman tal cual a la API de producción.
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);
});