const response = await fetch("https://algapsa.com/api/v1/schedules", {
method: "POST",
headers: {
"X-API-Key": "$ALGA_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"title": "x",
"scheduled_start": "2026-04-18T15:22:14Z",
"scheduled_end": "2026-04-18T15:22:14Z",
"work_item_id": "01HN2K7VRB9PQ3Y0000000000",
"work_item_type": "ticket",
"assigned_user_ids": [
"01HN2K7VRB9PQ3Y0000000000"
],
"calendar_id": "01HN2K7VRB9PQ3Y0000000000",
"notes": "string",
"is_private": false,
"is_all_day": false,
"recurrence_pattern": "string"
})
});
const data = await response.json();