Hi, i have a little problem when i try to delete an activity from api, my problem is simple i can’t delete any activity by external url.
For example, i have a PHP file that can create persons, deals and activities but i can’t find on documentation what i have to do to delete a activity from a external file or even modify a activity.
I know there is documentation about it, but it does not explain the process for carrying out the action, it only tells you the response in case of do it well.
Can you help me with some example code that delete an activity? in documentation only shows the response in case to do it well but in request tap there is only a simple link that don’t tell nothing and dont work by external url.
$url = ‘https://api.pipedrive.com/v1/activities?api_token=MY-TOKEN’;
$activity = array(
“subject” => $n." ".$a,
“done” => “0”,
“type” => “llamada”,
“user_id” => “10918543”,
“deal_id” => $result[‘data’][‘id’],
“person_id” => $id_user_api
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $activity);
//echo 'Sending request...' . PHP_EOL; $output = curl_exec($ch); curl_close($ch);
This is code PHP and allows you to create a new activity i need to know the code to delete an activity.
PD: I know I repeat myself but it’s because I’m not sure to explain myself correctly.