```php
<?php

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

EmployeeAuth::check('manage_roles');

$data = Request::post();

try{

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

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

$stmt = $conn->prepare("

INSERT INTO roles (name,description)
VALUES (:name,:description)

");

$stmt->execute([
':name'=>$data['name'],
':description'=>$data['description'] ?? null
]);

$role_id = $conn->lastInsertId();

Response::success([
'role_id'=>$role_id
],'Role created');

}
catch(Exception $e){

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

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

}