I have tried to update an item following the Directus documentation, but I can't update the record, it always returns
{ "error" : { "code" : 6, "message" : "Method Not Allowed" } }
My PHP code is:
$url = 'https://cms.domain.com/public/name-of-project/items/products/1?access_token=TOKEN';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['category'=>43]));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
What am I doing wrong?