delete_event
Remove a calendar event permanently from iCloud Calendar by specifying the calendar and event IDs.
Instructions
Delete a calendar event permanently from iCloud Calendar.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| calendarId | Yes | Calendar ID containing the event | |
| eventId | Yes | Event ID to delete |
Implementation Reference
- lib/caldav.js:444-455 (handler)The `deleteEvent` function handles the deletion of an event from a CalDAV calendar by making a DELETE request to the event's URL.
export async function deleteEvent(calendarId, eventId) { const { dataHost, calendarsPath } = await discover(); const url = `${dataHost}${calendarsPath}${calendarId}/${eventId}.ics`; const resp = await davRequest('DELETE', url); if (resp.status === 404) throw new Error(`Event not found: ${calendarId}/${eventId}`); if (resp.status !== 204 && resp.status !== 200) { throw new Error(`CalDAV DELETE failed: ${resp.status}`); } return { deleted: true, eventId, calendarId }; }