# delete_rule
The EvoShield delete_rule POST endpoint removes the specified rule by ID
Parameters
account
: The account key - which can be found in the Settings area of the Evolution Host client area: https://evolution-host.com/controlPanelservice_key
: The unique key for the particular Evolution Host service being used in this API call - Can be found by using the /list_services API endpointrule_id
: The unique ID for the protection profile you would like to be removed - Can be found using the list_active_evoshield_rules API endpoint$url = "https://evolution-host.com/api.php";
$postData = http_build_query([
'account' => 'YOUR_ACCOUNT_KEY',
'service_key' => 'YOUR_SERVICE_KEY',
'action' => 'delete_rule',
'rule_id' => 'VlUtBnC2',
]);
$headers = array(
'http' => array
(
'method' => "POST",
'ignore_errors' => true,
'header' => "Content-Type: application/x-www-form-urlencoded\r\n",
'content' => $postData,
),
);
$api_context = stream_context_create($headers);
$result = file_get_contents($url, false, $api_context);
$non_encoded_result = $result;
$result = json_decode($result);
if($result !== NULL)
{
if($result->description != '')
{
echo '<pre>' . json_encode($result->description, JSON_PRETTY_PRINT) . '</pre>';
}
else
{
echo "The rule has been removed!";
}
}
else
{
if($non_encoded_result != 'ok')
{
echo "Error deleting rule: $non_encoded_result";
}
else
{
echo "The rule has been removed!";
}
}