const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conversationId: '<string>',
messages: [
{
role: 'user',
content: '<string>',
name: '<string>',
tool_calls: ['<unknown>'],
tool_call_id: '<string>'
}
]
})
};
fetch('https://api.supermemory.ai/v4/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));