- $url="https://desk.zoho.com/api/v1/tickets";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array(
- "Authorization:$token",
- "orgId:$orgid",
- "Content-Type:application/json"
- ));
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- $data = array(
- "contactId"=>$zhid,
- "subject"=>"Testing",
- "description"=>"Testing ticket",
- "status"=>"Open",
- "departmentId"=>"77694000000006907"
- );
- curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
- $result = curl_exec($ch);
Any help is much appreciated :)