<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{{url}}/v5/api/index.php/addbroadcast',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
"brodcast_service":"whatsapp_credits",
"broadcast_name" : "newtestanshu",
"template_id" : 2,
"broadcast_message": "hello",
"schedule_date" : "2021-06-17",
    "schedule_time": "12:46:31",
    "contacts": "911234567890",
    "uploaded_image1":"",
    "uploaded_image1":"",
    "attribute2":"",
    "attribute3":"",
    "attribute4":"",
    "attribute5":"",
    "attribute6":"",
    "attribute7":"",
    "attribute8":"",
    "attribute9":"",
    "attribute10":"",
    "attribute11":""
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOi9.eyJpYXQiOjE2MjM5MjYxMzksImlzcyI6ImxvY2FsaG9zdCIsImV4cCI6MTYyMzkyNjE5OSwiZGF0YSI6eyJpZCI6IjExIiwibmFtZSI6ImFkbWluIiwibW9iaWxlIjoiODg3ODU4ODU5OSIsImVtYWlsIjoiYmhhcmF0LmFodWphMDdAZ21haWwuY29tIn19.0rry-OasxsOFzK6nZfL1p0V9eUuswaizkyvQlFKamQc',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;