'General', 'Subject' => 'hello world3', 'CustomFields' => ['Hub Name' => 'North America'], 'Priority' => '1' ]; //Other values are exampled: https://docs.bestpractical.com/rt/5.0.3/RT/REST2.html#Basic-Auth // Convert the data array to JSON $json_data = json_encode($data); // Set cURL options curl_setopt($ch, CURLOPT_URL, $url); // Set URL curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return response as a string curl_setopt($ch, CURLOPT_POST, true); // Use POST method curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data); // Set POST data curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // Set headers curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Disable SSL verification (equivalent to `-k` in curl) curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); // Don't check hostname in certificate // Execute the cURL request $response = curl_exec($ch); // Check for errors if ($response === false) { echo 'Curl error: ' . curl_error($ch); } else { echo 'Response: ' . $response; } // Close the cURL session curl_close($ch); ?>