You can use this API to programmatically send messages between users and groups.
Send Message
POST - https://api.cometondemand.net/api/v2/sendMessage
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/sendMessage", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/sendMessage \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Get Messages
POST - https://api.cometondemand.net/api/v2/getMessages
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/getMessages", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "offset=0&limit=100", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/getMessages \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data offset=0 \ --data limit=100
Get Group Messages
POST - https://api.cometondemand.net/api/v2/getGroupMessages
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/getGroupMessages", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "offset=0&limit=100", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/getGroupMessages \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data offset=0 \ --data limit=100
Get Unread Message Count (One-on-one)
POST - xhttps://api.cometondemand.net/api/v2/getUnreadMessageCounts
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/getUnreadMessageCounts", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/getUnreadMessageCounts \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Get Unread Message Count for Groups
POST - https://api.cometondemand.net/api/v2/getUnreadMessageCountForGroups
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/getUnreadMessageCountForGroups", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/getUnreadMessageCountForGroups \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Get Call History
POST - https://api.cometondemand.net/api/v2/getCallHistory
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/getCallHistory", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "offset=0&limit=100", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/getCallHistory \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data offset=0 \ --data limit=100
Send Sticker
POST - https://api.cometondemand.net/api/v2/sendSticker
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/sendSticker", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/sendSticker \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Send File
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/sendFile", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/sendFile \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Send Broadcast Message
POST - https://api.cometondemand.net/api/v2/sendBroadcastMessage
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/sendBroadcastMessage", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Accept: application/json", "Content-Type: application/x-www-form-urlencoded" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
curl --request POST \ --url https://api.cometondemand.net/api/v2/sendBroadcastMessage \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article