Auphere Embed · Guides
/ v0.1
Sending broadcasts
Let your clients send approved WhatsApp templates with dynamic variables to a list of recipients — your data, their number, our delivery rules.
A broadcast sends one approved WhatsApp template to N recipients, each with their own variable values. The division of labor is strict: your app provides the audience (your CRM is the source of truth), and the Auphere modal lets the client pick a template, preview it with real values, and send. The widget never invents recipients.
React
AuphereBroadcastButton renders only when that client’s WhatsApp is connected, and opens the modal on click:
import { AuphereBroadcastButton } from "@auphere/embed/react";
<AuphereBroadcastButton
auphere={auphere}
recipients={[
{ phone: "+56912345678", variables: { cliente: "Ana", saldo_pendiente: "$12.000" } },
{ phone: "+56987654321", variables: { cliente: "Luis", saldo_pendiente: "$8.000" } },
]}
className="your-button-class"
onDone={({ broadcastId, accepted }) => console.log(broadcastId, accepted)}
>
Campañas WhatsApp
</AuphereBroadcastButton>Vanilla JavaScript
Without React, gate your own button with the status API and call openBroadcast directly:
await auphere.openBroadcast({
recipients: [
{ phone: "+56912345678", variables: { cliente: "Ana", saldo_pendiente: "$12.000" } },
],
onDone: ({ broadcastId, accepted }) => { /* accepted = recipients queued */ },
onExit: () => { /* modal closed */ },
});Recipients and variables
phonestringRequired- E.164 format, e.g.
+56912345678. Spaces and dashes are tolerated. variablesRecord<string, string>- Values for the template’s named parameters — keys must match the parameter names of the approved template (e.g.
{ cliente: "Ana" }for a{{cliente}}placeholder). You map your schema to those names in your backend.
Templates
Each client sends from their own WhatsApp Business account, so templates are approved by Meta per client. The modal only offers templates that are already approved. Today the initial template set is created with assistance from the Auphere team right after a client connects; automatic template provisioning per partner is on the roadmap.
Delivery rules
- Opt-outs are enforced. Recipients who opted out are excluded before sending — you don’t need to filter them yourself (though you can).
- Templates work outside the 24-hour window. That’s what they’re for; free-form messages are not part of broadcasts.
- Audience cap. Each send is capped (250 recipients by default, configurable per partner). Larger audiences get a
413— split the send or ask us to raise your cap. - Attribution.
onDonereturns thebroadcastIdand how many recipients were accepted; per-client usage is tracked for reporting and billing.