<?php
$payload = [
"to" => "+255700000000",
"text" => "Your booking is confirmed.",
"channels" => ["whatsapp_qr", "sms"],
"deliveryMode" => "fallback",
"whatsappFrom" => "447405993704",
"sender" => "DM BLUEWAVE"
];
$baseUrl = getenv("KARFLOWS_BASE_URL") ?: "https://karflows.com";
$ch = curl_init($baseUrl . "/api/omni/send");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("KARFLOWS_UNIFIED_TOKEN"),
"Content-Type: application/json"
],
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;