const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({token: '<string>'})
};
fetch('https://api.memcontext.in/api/workspaces/invitations/accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));