Quickstart
Send your first WhatsApp message in under ten minutes. You will use a test key, so you do not need a WhatsApp Business Account, a Meta app, or a connected phone number — the sandbox simulates the entire delivery lifecycle, including webhooks.
1. Get a test API key
Sign up at app.blueticked.com, then go to Settings → API keys and create a key. Test keys start with blu_test_; live keys with blu_live_.
2. Install the SDK
npm install @blueticked/sdkThe SDK has zero dependencies and runs on Node 18+, serverless functions, and edge runtimes. Prefer raw HTTP? Every example below is a plain POST with Authorization: Bearer blu_test_... — see the OpenAPI spec.
3. Create a contact and send
import { Blueticked } from "@blueticked/sdk";
const bt = new Blueticked({ apiKey: process.env.BLUETICKED_API_KEY! });
// +27800000001 is a magic sandbox number: it always delivers.
await bt.contacts.upsert({ phone: "+27800000001", first_name: "Sam" });
const message = await bt.messages.send({
channel: "whatsapp",
to: { phone: "+27800000001" },
template_id: "<an approved template id>",
template_variables: { "1": "Sam" },
});
console.log(message.status); // "queued"4. Watch it deliver
The sandbox advances the message every few seconds: queued, then sent, then delivered, then read. Poll it, or better, receive webhooks:
const status = await bt.messages.get(message.message_id);
console.log(status.status); // "delivered" a few seconds later5. Receive webhooks
Add a webhook subscription under Developers → Webhooks in the dashboard, then verify and handle deliveries — test-mode events carry "test": true:
import { Blueticked } from "@blueticked/sdk";
const bt = new Blueticked({ apiKey: process.env.BLUETICKED_API_KEY! });
export async function POST(req: Request) {
const payload = await req.text(); // raw body — do not re-serialize
const event = await bt.webhooks.constructEvent(
payload,
req.headers.get("x-blueticked-signature") ?? "",
process.env.BLUETICKED_WEBHOOK_SECRET!,
);
if (event.event === "message.delivered") {
// update your order, mark the statement sent, etc.
}
return new Response("ok");
}Going live
- Connect your WhatsApp number in minutes via Embedded Signup (Onboarding → Connect WhatsApp). Blueticked is a verified Meta Tech Provider.
- Submit a template for approval — see Templates and approval.
- Swap
blu_test_forblu_live_. Nothing else changes.