Another userful example which help me

$data = array(
“number” => “3dde3379-e38a-104c-089f-53b554ed5dfa”,
“email” => “[email protected]”,

);

$json_data = json_encode($data);

$headers[] = ‘Content-Type: application/json’;
$headers[] = ‘Content-Length: ‘ . strlen($json_data);

$ch = curl_init($url);

//That two line is very important for PUT!
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “PUT”);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$content = curl_exec($ch);
$info = curl_getinfo($ch);

curl_close($ch);