```php
<?php

require_once '../../core/api_bootstrap.php';


require_once '../../core/employee_auth.php';
EmployeeAuth::check('manage_blog');

$data = Request::post();

try {

Validator::required($data,['id']);

$db = new Database();
$conn = $db->connect();

$conn->prepare("

UPDATE blog_posts
SET status='draft'
WHERE id=:id

")->execute([

':id'=>$data['id']

]);

Logger::activity(
ApiAuth::employeeId(),
"delete",
"blog_posts",
$data['id'],
ApiAuth::ip()
);

Response::success([],"Blog post removed");

}
catch(Exception $e){

Logger::log("system.log",$e->getMessage());

Response::error("Server error",500);

}