const res = await fetch('https://t0ggles.com/api/v1/tasks', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer YOUR_API_KEY',
},
body: JSON.stringify({
tasks: [
{
title: 'Launch Campaign Planning',
projectKey: 'MARKETING',
descriptionType: 'markdown',
descriptionContent: '## Launch Campaign Timeline ...',
subtasks: [
{
title: 'Finalize creatives and copy',
projectKey: 'MARKETING',
descriptionType: 'markdown',
descriptionContent: '## Finalize creatives and copy ...',
},
],
},
],
}),
});
console.log(await res.json());