How to rename the Customer Group using REST API

Hi,

I want to rename the customer group document using rest API in node JS. So please help me on this.
Here is the code

var request = require(‘request’);
var options = {
‘method’: ‘PUT’,
‘url’: ‘https://pranera.erpnext.com/api/resource/Customer Group/tests’,
‘headers’: {
‘Content-Type’: ‘text/plain’
},
body: ‘{ “name”: “test”}’

};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});

and getting an error like below,

{
“exc_type”: “ValidationError”,
“exception”: “frappe.exceptions.ValidationError: Record does not exist”,
“exc”: “["Traceback (most recent call last):\n File \"apps/frappe/frappe/app.py\", line 69, in application\n response = frappe.api.handle()\n File \"apps/frappe/frappe/api.py\", line 94, in handle\n frappe.local.response.update({\"data\": doc.save().as_dict()})\n File \"apps/frappe/frappe/model/document.py\", line 310, in save\n return self._save(*args, **kwargs)\n File \"apps/frappe/frappe/model/document.py\", line 341, in save\n self.check_if_latest()\n File \"apps/frappe/frappe/model/document.py\", line 783, in check_if_latest\n frappe.throw((\"Record does not exist\"))\n File \"apps/frappe/frappe/init.py\", line 503, in throw\n msgprint(\n File \"apps/frappe/frappe/init.py\", line 478, in msgprint\n _raise_exception()\n File \"apps/frappe/frappe/init.py\", line 433, in _raise_exception\n raise raise_exception(msg)\nfrappe.exceptions.ValidationError: Record does not exist\n"]”,
“_server_messages”: “["{\"message\": \"Record does not exist\", \"title\": \"Message\", \"indicator\": \"red\", \"raise_exception\": 1}"]”
}