Updating notes via API generate error : "Cannot add update note because deal does not exist or you have no permissions to access this deal."

Hello, I’m using API to communicate between my application and pipedrive. But when a user update a note in the application and I synchronise data with pipedrive I encrouter “Cannot add/update note because deal does not exist or you have no permissions to access this deal.”

Note that the tocken is for the “Admin” user.

Here’s my Php code

$curl = curl_init();

			curl_setopt_array($curl, array(
				CURLOPT_URL => 'https://api.pipedrive.com/v1/notes?api_token='.$this->token,
				CURLOPT_RETURNTRANSFER => true,
				CURLOPT_ENCODING => '',
				CURLOPT_MAXREDIRS => 10,
				CURLOPT_TIMEOUT => 0,
				CURLOPT_FOLLOWLOCATION => true,
				CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
			
				CURLOPT_CUSTOMREQUEST => 'POST',
				CURLOPT_POSTFIELDS => array('content' => $content,'user_id' => $userID,'deal_id' => $dealID,'org_id' => $orgID),
			));

			$response = curl_exec($curl);

Can you tell me what’s wrong ?

Hello @mourad , welcome to the community!

I’m talking to my colleagues and the code seems to be fine. Can you send me some info via private message for further investigation? What we need:

  • What is your user in Pipedrive
  • What company you are using for the test