const options = {
method: 'POST',
headers: {
'x-metrics-client-audience': '<x-metrics-client-audience>',
'x-metrics-document-reference': '<x-metrics-document-reference>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
targetOwnerActorId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reason: 'owner_requested_transfer'
})
};
fetch('https://app.chatobserver.com/api/v2/metrics/client/schedules/{scheduleId}/ownership', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));