Start Sending messages without any template approvals.

Start sending messages using the API Key (provided in the profile section of your account) and the URL provided by the admin.

URL : https://{{url}}/v5/api/index.php/addbroadcast

broadcast_name: string

brodcast_service: whatsapp_credits

contacts: Phone Numbers with country code

uploaded_image1: {{1}} 
attribute2:  {{2}} //Here goes your message



Note:
** {{1}} is for Media Path. Ensure https:// in the URL of media. 

** Supported Media is .pdf, .jpg, .png, .mp3, .mp4

** {{2}} is reserved for the text values or variables in the message.

📘

Sample Response

{"request_id":"611233e00aa21","status":"Queued","message":"Success","username":"user","Credits":93}

<?php

$api_key="Get it from Profile";
$mobile='911234567890';
$url="https://{{url}}/v5/api/index.php/addbroadcast";
$param =  [

'brodcast_service'=>'whatsapp_credits',
'broadcast_name'=>'name',
 'contacts'=>$mobile,
 'uploaded_image1'=>$uploaded1_1,
  'attribute2':'Text message'
    
] ;
$jsonval=json_encode($param);


$curl = curl_init();
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt_array($curl, array(
      CURLOPT_URL => $url,
      CURLOPT_FAILONERROR => true,
      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 =>$jsonval,
      CURLOPT_HTTPHEADER => array(
        'Authorization: '.  $api_key,
        'Content-Type: application/json'
      ),
    ));
     

    try
    {
       $response = curl_exec($curl); 

       if(curl_errno($curl)){
        echo json_encode(array('status' => "error", 'message' =>curl_error($curl)));
        exit(0); 
        }

       echo json_encode(array('status' => "ok", 'message' => $response));
       exit(0); 
    }
    catch(Exception $e){
        echo json_encode(array('status' => "error", 'message' => $e));
        exit(0); 
    }

?>
var client = new RestClient("http://api.spinningdisk.in/v5/api/index.php/addbroadcast");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader("Authorization", "api_key from the panel");
var body = @"{" + "\n" +
@"""message"":""message_test"",    " + "\n" +
@"""brodcast_service"":""whatsapp_credits""," + "\n" +
@"""broadcast_name"" : ""test_sep""," + "\n" +
@"""template_id"" : ""Hello""," + "\n" +
@"""broadcast_message"": """"," + "\n" +
@"    ""contacts"": ""911234567899""," + "\n" +
@"    ""uploaded_image1"":""https://blddnt.com/a.jpg""," + "\n" +
@"    ""attribute2"":""1""," + "\n" +
@"    ""attribute3"":""2""," + "\n" +
@"    ""attribute4"":""3""," + "\n" +
@"    ""attribute5"":""4""," + "\n" +
@"    ""attribute6"":""5""," + "\n" +
@"    ""attribute7"":""6""," + "\n" +
@"    ""attribute8"":""7""," + "\n" +
@"    ""attribute9"":""8""," + "\n" +
@"    ""attribute10"":""9""," + "\n" +
@"    ""attribute11"":""10""," + "\n" +
@"    ""attribute12"":""11""," + "\n" +
@"    ""attribute13"":""12""" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);