DELETE - Delete event
Purpose
This API is used to delete an event from a user's calendar.
Request URL
https://calendar.zoho.com/api/v1/calendars/<CALENDAR_UID>/events/<EVENT_UID>
Header
etag - etag value of the event previously received in API response. (Header need not be sent if "etag" is present in eventdata).
[etag - mandatory if eventdata is not sent in params]
OAuth Scope
scope=ZohoCalendar.event.ALL
(or)
scope=ZohoCalendar.event.DELETE
ALL - Full access to events
DELETE - Deletes an event
Request Parameters
- eventdataJSONObject, optional
- eventdata parameter is required to delete any particular instance of a recurring event.
- You need to pass the eventdata as a JSON Object with the following parameters:
- UID - The event UID of the event, that needs to be deleted.
- recurrence ID - The recurrence ID parameter can be retrieved from Get event details by Range API with byinstance parameter set to True.
Example: 20230104T114100Z (ICS Format - yyyyMMdd'T'HHmmss'Z' in GMT format or yyyyMMdd (if the parent event is all day event)) - etag - long (get from event -> always send latest etag)
- recurrence_edittype - following|only [ If recurrence id is provided without recurrence_editype, then recurrence_edittype is "only" ]
- notify_attendee - 0|1|2
0 - none
1 - notify attendees only
2 - notify both attendees and myself
Note:
When deleting a recur break event, recurrence id must be sent with the eventObject in the ICS Format - yyyyMMdd'T'HHmmss'Z' in GMT format or yyyyMMdd (if the parent event is all day event)
Sample Request- 1:(etag in header)
Copiedhttps://calendar.zoho.com/api/v1/calendars/l9WWZCf_SJWcr3uIuBOq5g==/events/d8510b3d19dd477db6777191147efc1e@zoho.com?
eventdata=
{
"uid":"d8510b3d19dd477db6777191147efc1e@zoho.com",
"recurrenceid":20161205
}
Header:
etag - 1480397612447
Sample Request-2:(etag in eventObj)
Copiedhttps://calendar.zoho.com/api/v1/calendars/l9WWZCf_SJWcr3uIuBOq5g==/events/d8510b3d19dd477db6777191147efc1e@zoho.com?
eventdata=
{
"uid":"d8510b3d19dd477db6777191147efc1e@zoho.com",
"etag": "1692771653044",
"recurrenceid": "20230825T073000Z",
"recurrence_edittype": "only"
}
Sample Response (normal event)
Copied{
"events": [
{
"uid": "d8510b3d19dd477db6777191147efc1e@zoho.com",
"estatus": "deleted",
"caluid": "6b156372a9f44598ba6556cb7df8cf40"
}
]
}
Sample Response (break event)
Copied{
"events": [
{
"uid": "d8510b3d19dd477db6777191147efc1e@zoho.com",
"estatus": "deleted",
"etag": "1692773607031",
"caluid": "6b156372a9f44598ba6556cb7df8cf40",
"recurrenceid": "20230825T073000Z"
}
]
}