Update contact through php cUrl

Update contact through php cUrl

Hi there,

As of example: https://help.zoho.com/portal/en/community/topic/create-contact, now I would like to update a contact, using php cUrl in my third-party script. But I keep running into errors.

My latest example is:

$contact_id = ''635815000000270001;
$url = 'https://books.zoho.com/api/v3/contacts/'.$contact_id.'?authtoken=xxxxx&organization_id=xxxxx
$data = array( 'JSONString' => '{"contact_name" => "Testbedrijf XX"}' );
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

Error is:
{"code":37,"message":"The HTTP method POST is not allowed for the requested resource"}

So what should be the correct way?