Overview
BroadNet envia o status de entrega para o URL do webhook configurado na sua conta à medida que cada mensagem avança no seu ciclo de vida. Você também pode consultar: GET /whatsapp/message/bulk-insights devolve o status de cada destinatário WhatsApp num lote, e GET /sms/list devolve a contagem de mensagens SMS processadas e pendentes.
Exemplos
Copie, cole e substitua os marcadores — estes exemplos chamam a API de produção tal como estão.
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);
});