const options = {
method: 'PATCH',
headers: {
'x-api-key': '<api-key>',
'x-api-secret': '<api-key>',
'x-connector-id': '<api-key>',
'x-owner-id': '<api-key>',
'x-session-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
eventType: {
id: '<string>',
object: 'resourceRef',
model: '<string>',
fields: '<unknown>',
rawResource: '<unknown>',
remote: {id: '<string>'},
createdAt: '<string>',
updatedAt: '<string>'
},
title: '<string>',
description: '<string>',
status: 'requested',
startTime: '2023-11-07T05:31:56Z',
endTime: '2023-11-07T05:31:56Z',
duration: 123,
attendees: [
{
id: '<string>',
object: 'resourceRef',
model: '<string>',
fields: '<unknown>',
rawResource: '<unknown>',
remote: {id: '<string>'},
createdAt: '<string>',
updatedAt: '<string>'
}
],
externalAttendees: [
{
email: '<string>',
firstName: '<string>',
lastName: '<string>',
phoneNumber: '<string>'
}
],
organizer: {
id: '<string>',
object: 'resourceRef',
model: '<string>',
fields: '<unknown>',
rawResource: '<unknown>',
remote: {id: '<string>'},
createdAt: '<string>',
updatedAt: '<string>'
},
answers: {}
})
};
fetch('https://api.runmorph.dev/v1/resources/schedulingEvent/{resourceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));