Add a new role using the Drupal Services Rest api
First of All you could create the custom resource in a custom module and enable it, for doing that follow that tutorial 

Second in the callback function use that code to create a new role

$role = new stdClass();
$role-&gt;name = 'editor';
// $role-&gt;weight = 10;
user_role_save($role);


Let the role name be an argument taken from the request.