Delete activity from api

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.

https://developers.pipedrive.com/docs/api/v1/#!/Activities/delete_activities tells
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.

problem solved if you find this problem too you unly have to set the curl via DELETE like there:
$ch = curl_init();
curl_setopt(ch, CURLOPT_URL, 'https://api.pipedrive.com/v1/activities/'._GET[‘actividad’].’?api_token=MY-TOKEN’);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘Content-Type: application/json’,'Content-Length: ’ . strlen($activity)));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “DELETE”);
echo json_decode(curl_exec($ch));