const url = 'https://api.sureshake.com/v2/entities/<id>/roles';
const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'string',
description: 'string',
permissions: ['string'],
roleId: '7382d58e-652a-4905-b7c9-bcca1e0e5391'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));