const options = {
method: 'POST',
headers: {
'X-Instance-Id': '<x-instance-id>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({text: 'Hello from WSAPI!'})
};
fetch('https://api.wsapi.chat/status/text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));