/// TEXT MESSAGE '5pl19F24Sr0LLQO8BdUcqqOzoplQle', 'sender' => 'Sender', 'number' => 'receiver', 'message' => 'Your message' ]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => https://wa.mitraapi.in/send-message, 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 => json_encode($data), CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?> /// WITH MEDIA '5pl19F24Sr0LLQO8BdUcqqOzoplQle', 'sender' => 'Sender', 'number' => 'receiver', 'message' => 'Your caption', 'url' => 'Url Media' 'type' => 'audio / video / image / pdf / xls /xlsx /doc /docx /zip'//Choose One ]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => https://wa.mitraapi.in/send-media, 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 => json_encode($data), CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?> // WITH BUTTON '5pl19F24Sr0LLQO8BdUcqqOzoplQle', 'sender' => 'Sender', 'number' => 'receiver', 'message' => 'Your message', 'footer' => 'Your footer message', 'image' => 'URL image ', //OPTIONAL 'button1' => 'Button 1 ', //REQUIRED ( Button minimal 1 ) 'button2' => 'Button 2', //OPTIONAL 'button3' => 'Button 3',//OPTIONAL ]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => https://wa.mitraapi.in/send-button, 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 => json_encode($data), CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>