const url = 'https://api.sureshake.com/v2/reports/<id>/shares/email';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
versionId: '14707576-2549-4848-82ed-f68f8a1b47c7',
email: 'user@example.com',
permission: 'read',
allowDraftShare: false,
message: 'string',
allowDownload: true,
watermark: true
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));