You can use our Groups API to create groups programmatically and manage group users!
Let's dive-in!
Create Group
POST - https://api.cometondemand.net/api/v2/createGroup
curl --request POST \ --url https://api.cometondemand.net/api/v2/createGroup \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/createGroup", 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; }
Delete Group
POST - https://api.cometondemand.net/api/v2/deleteGroup
curl --request POST \ --url https://api.cometondemand.net/api/v2/deleteGroup \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/deleteGroup", 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; }
Add Users to Group
POST - https://api.cometondemand.net/api/v2/addUsersToGroup
curl --request POST \ --url https://api.cometondemand.net/api/v2/addUsersToGroup \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data clearExisting=false
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/addUsersToGroup", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "clearExisting=false", 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; }
Remove Users From Group
POST - https://api.cometondemand.net/api/v2/removeUsersFromGroup
curl --request POST \ --url https://api.cometondemand.net/api/v2/removeUsersFromGroup \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/removeUsersFromGroup", 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; }
List Groups
POST - https://api.cometondemand.net/api/v2/getGroupList
curl --request POST \ --url https://api.cometondemand.net/api/v2/getGroupList \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/getGroupList", 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; }
List Group Members
POST - https://api.cometondemand.net/api/v2/getGroupUserList
curl --request POST \ --url https://api.cometondemand.net/api/v2/getGroupUserList \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/getGroupUserList", 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; }
Ban Users From Group
POST - https://api.cometondemand.net/api/v2/banUsersFromGroup
curl --request POST \ --url https://api.cometondemand.net/api/v2/banUsersFromGroup \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/banUsersFromGroup", 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; }
Kick Users From Group
POST - https://api.cometondemand.net/api/v2/kickUsersFromGroup
curl --request POST \ --url https://api.cometondemand.net/api/v2/kickUsersFromGroup \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/kickUsersFromGroup", 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; }
Unban Users From Group
POST - https://api.cometondemand.net/api/v2/unbanUsersFromGroup
curl --request POST \ --url https://api.cometondemand.net/api/v2/unbanUsersFromGroup \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/unbanUsersFromGroup", 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; }
Update Group
POST - https://api.cometondemand.net/api/v2/updateGroup
curl --request POST \ --url https://api.cometondemand.net/api/v2/updateGroup \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded'
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.cometondemand.net/api/v2/updateGroup", 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; }
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