PUT - Update an Event
Purpose
This API is used to update the details of an existing event in a user's calendar.
Request URL
https://calendar.zoho.com/api/v1/calendars/<calendar_uid>/events/<event_uid>
OAuth Scope
scope=ZohoCalendar.event.ALL
(or)
scope=ZohoCalendar.event.UPDATE
scope=ZohoMeeting.meeting.ALL (Needs to be added while adding meetings to the event)
ALL - Grants full access to events.
UPDATE - Grants permission to update events.
Path Parameters
- calendar_uid string, mandatory
- This parameter represents the unique identifier for the calendar where the event exists.
- event_uid string, mandatory
- This parameter represents the unique identifier for the event to be updated.
Query Parameters
- eventdata JSONObject, mandatory
This JSON object is passed to update the data of a particular event in the calendar using the following keys and values.
Input JSON keys:
- title string
Specifies the title of the event to be updated.
- dateandtime JSONObject, mandatory
Send JSON Object of the start time, end time in Unix time format along with the time zone information, in case, different from the current user time zone.
- start string, mandatory
Specifies the start date and time of the event. Use the following formats:
- For a specific time: yyyyMMdd'T'HHmmss'Z' in GMT format (e.g., 20241028T103000Z).
- For an all-day event: yyyyMMdd (e.g., 20241028).
- end string, mandatory
Specifies the end date and time of the event. Use the following formats:
- For a specific time: yyyyMMdd'T'HHmmss'Z' in GMT format (e.g., 20241028T103000Z).
- For an all-day event: yyyyMMdd (e.g., 20241028).
- timezone string
Mention the timezone in which the event is being created.
- convertToEventTZ boolean
Indicates whether the event's original timezone should be maintained. Allowed values: true|false
- true - If true, the event's original timezone will be used.
- false
- isallday boolean
Specifies whether the event is an all-day event or not. Allowed values: true|false
- true - If true, use all-day event format in dateandtime JSONobject.
- false
- isprivate boolean
Specifies whether the event is private or not. Allowed values: true | false
- true - When true, the event details are hidden from others, even if the calendar is public or shared, except for users with delegate permissions.
- false - The event is public.
- url string
Specifies the URL details that need to be shared for the event, along with the description, if any. Example: "https://mail.zoho.com"
- recurrence_edittype string
- This parameter is used to specify how repeat events should be edited. It defines whether changes apply to a single occurrence, future occurrences, or all occurrences of a recurring event.
- Allowed values: following | only | all
- following - Edits the selected occurrence and all future occurrences of a recurring event.
- only - Edits only the selected occurrence of a recurring event.
- all -Edits all occurrences of the recurring event, both past and future.
- The default value is "all" (If the value of recurrence_edittype parameter is not mentioned while editing a recurring event, all occurrences will be edited).
- location string
Specifies the location details for the event. Maximum length- 255 characters.
- description string
Specifies the description of the event, to provide more details about the event to the attendees. Maximum length- 10000 characters.
- richtext_description string
This parameter is used to provide a rich-text formatted description for the event. If the description includes formatting (e.g., bold, italic, links), it should be provided in richtext_description. Maximum length- 12000 characters. Note: Either description or richtext_description should be sent in the API request, but not both. If both fields are sent, there is a risk of one overwriting the other.
- color string
Specifies the hex-color for the event. Use this to set a specific color for the event that differs from the default color. Example- #E574B0
- attendees JSONArray
- This parameter is used to include the attendee details for the event.
- Example: "attendees": [{"email":"user1@domain.com", "permission":"1"},{"email":"user2@domain.com","permission":"1"}]
- This JSON Array includes the below parameters as JSONObject:
- email string, mandatory
- Specifies the email id of the attendee.
- zid long
- Specifies the zuid of the attendee.
- permission integer
- Specifies the attendee's permission for the event.
- Allowed values : 0 | 1 | 2 | 3
- 0 - Guest
- 1 - View
- 2 - Invite
- 3 - Edit
- attendance integer
- Specifies the attendance of the attendee.
- Allowed values : 0 |1 | 2
- 0- Non-participant
- 1- Required participant
- 2 - Optional participant
- status string
- This parameter is used to update the attendance status of an attendee for an event.
- Allowed values: NEEDS-ACTION | ACCEPTED | DECLINED | TENTATIVE
Note :
Each attendee's details have to be mentioned as a separate JSONObject.
- group_attendees JSONArray
- This parameter is used if group is added as attendee.
- Example: "group_attendees":[{"zid":"123565"}]
- This JSONArray includes the below parameters as JSONObject:
- zid long, mandatory
- Specifies the zuid of the group.
- isrep boolean
- This parameter specifies whether the event is repeating or a one-time occurrence.
- Allowed values: true | false
- true - The event repeats based on rrule parameter.
- false - The event is a one-time occurrence. The rrule parameter must not be used when the isrep parameter value is set to false.
- If isrep is false, the event will not repeat, and any recurrence-related parameters should be excluded.
- recurrenceid string
- Used to identify and modify a specific instance (and optionally following instances) of a recurring event.
- Use the following formats:
- For timed events: yyyyMMdd'T'HHmmss'Z'
Example: 20240104T114100Z (represents January 4, 2024, at 11:41:00 GMT). - For all-day events: yyyyMMdd (if the parent event is all day event)
Example: 20240104 (represents January 4, 2024).
- For timed events: yyyyMMdd'T'HHmmss'Z'
- reminders JSONArray
- Specifies the type of reminders to be set for the event.
- Example: "reminders":[{"action": "email", "minutes": 30}, {"action": "popup", "minutes": 15}]
- This JSONArray includes the below parameters as JSONObject:
- action string
- Specifies the reminder type.
- Allowed values: email | popup | notification.
- minutes integer, mandatory
- Specifies the time before the event (in minutes) when the reminder will trigger.
- etag long, mandatory
- This parameter is a unique identifier or version tag assigned to an event, which changes whenever the event is created or modified. Always send the latest etag value when updating an event.
- This parameter can be retrieved from Get event details API.
Note :
The etag can be provided either in the request header or within the eventdata (in the JSON Object). If included in the eventdata, it doesn't need to be sent as a header.
- calendar_alarm boolean
- Specifies whether to enable a calendar alarm for the event.
- Allowed values: true | false
- true - Enables a calendar alarm for the event.
- false - Disables the calendar alarm.
- notify_attendee integer
- Used to notify the attendees of the event.
- Allowed values : 0 | 1 | 2
- 0- None.
- 1- Notify attendees only.
- 2- Notify both attendees and myself.
- attach JSONObject
- This parameter allows files to be attached to an event by including their unique file IDs in a comma-separated format.
- This JSONObject has the below parameters:
- fileId string
- Specifies the file(s) to be attached to the event. Multiple file IDs should be separated by commas.
- The file IDs correspond to files previously uploaded and retrievable through the Get Attachment API.
- rmAttachId string
- This parameter is used to remove one or more attachments from an event. It accepts a comma-separated list of file IDs, specifying the attachments to be removed.
- transparency integer
- Specifies whether the event should be added to the free/busy schedule.
- Allowed values : 0 | 1
- 0 - Add to free/busy schedule.
- 1 - Don't add to your free/busy schedule. The grid will be shown as free even if events are present at that time.
- conference string
- Specifies the conference option to be associated with the event.
- Allowed values : zmeeting | none
- To remove the conference, set the value of conference to "none".
- notifyType integer
- Specifies the notification type for the event. Currently, only the default notification type is supported.
- Allowed values : 1
- 1 - Default Notification
- allowForwarding boolean
- Specifies whether the attendees are allowed to forward the event or not.
- Allowed values: true | false
- true - The attendees are allowed to forward the event.
- false - The attendees are not allowed to forward the event.
- rrule string
- This parameter is used to create repeat/recurring events.
- Allowed values :
- FREQ string
- Specifies the frequency of the recurrence.
- Allowed values: DAILY | WEEKLY | MONTHLY | YEARLY
- INTERVAL integer
- Specifies the interval between each occurrence.
- For example:
INTERVAL = 1 - Event occurs everyday.
INTERVAL = 2 - Event occurs every 2 days. - Default value is 1.
- COUNT integer
- Specifies the number of times the event occurs.
- BYDAY string
- Specifies the days of the week on which the event occurs.
- Used when FREQ is WEEKLY, MONTHLY, or YEARLY.
- Example :
In Monthly and Yearly Events: 4FR (indicating the fourth Friday).The first number defines which weekday in the month: possible values are 1 (first), 2 (second), 3 (third), 4 (fourth), and -1 (last). The two-letter code represents the day of the week: possible values are MO (Monday), TU (Tuesday), WE (Wednesday), TH (Thursday), FR (Friday), SA (Saturday), and SU (Sunday).
In Daily Events: Possible values depend on the weekdays set in the settings (e.g., MO, TU, WE, TH, FR, SA, SU).
In Weekly Events: Possible values are MO, TU, WE, TH, FR, SA, SU
- UNTIL string
- Specifies the end date of the recurrence.
- Use yyyyMMdd'T'HHmmss'Z' in GMT format or yyyyMMdd for all-day events.
Example: UNTIL=20250818T094500Z means the event repeats until 18 Aug 2025.
- BYSETPOS integer
- Specifies the occurrence of the week in a month or year.
- Used when FREQ is MONTHLY or YEARLY.
- Possible values are: 1 - First, 2 - Second, 3 - Third, 4 - Fourth, -1 - Last.
For example, 1MO for the first Monday, -1MO for the last Monday.
- BYMONTHDAY integer
- Specifies the day of the month.
- Used when FREQ is MONTHLY or YEARLY.
- Values range from 1 to 31.
- BYMONTH integer
- Specifies the month of the year.
- Used when FREQ is YEARLY.
- Values range from 1 (January) to 12 (December).
- Example:
- For daily recurring event :
"FREQ=DAILY;COUNT=5;INTERVAL=1" (Every day for 5 occurrences.)
"FREQ=DAILY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR;COUNT=5" (Every weekday for 5 occurrences.) - For weekly recurring event:
"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU;UNTIL=20250817T064600Z" (Every week on Monday,Tuesday Until 17 Aug 2025.) - For monthly recurring event:
"FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=17" (On the 17th day of every month.)
"FREQ=MONTHLY;INTERVAL=1;BYDAY=TU;BYSETPOS=-1;COUNT=2" (Last Tuesday of every month for 2 occurrences.) - For yearly recurring event:
"FREQ=YEARLY;INTERVAL=1;BYDAY=MO;BYSETPOS=3;BYMONTH=7" (Every third Monday of July each year.)
"FREQ=YEARLY;INTERVAL=1;BYMONTH=7;BYMONTHDAY=17;COUNT=1" (On July 17 every year, for 1 occurrence.)
- For daily recurring event :
- repeat JSON Array(Use either rrule or repeat parameter to update repeat/recurring events)
This parameter is used to update repeat events.This JSONArray includes below parameters as JSONObject:
- Allowed values :
- freq string
- Specifies the frequency of the recurrence.
- Allowed values: DAILY | WEEKLY | MONTHLY | YEARLY
- interval integer
- Specifies the interval between each occurrence.
- For example:
interval = 1 - Event occurs everyday.
interval = 2 - Event occurs every 2 days.
- count integer
- Specifies the number of times the event occurs.
- byday string
- Specifies the days of the week on which the event occurs.
- Used when FREQ is WEEKLY, MONTHLY, or YEARLY.
- Example :
In Monthly and Yearly Events: 4FR (indicating the fourth Friday).The first number defines which weekday in the month: possible values are 1 (first), 2 (second), 3 (third), 4 (fourth), and -1 (last). The two-letter code represents the day of the week: possible values are MO (Monday), TU (Tuesday), WE (Wednesday), TH (Thursday), FR (Friday), SA (Saturday), and SU (Sunday).
In Daily Events: Possible values depend on the weekdays set in the settings (e.g., MO, TU, WE, TH, FR, SA, SU).
In Weekly Events: Possible values are MO, TU, WE, TH, FR, SA, SU
- until string
- Specifies the end date of the recurrence.
- Use yyyyMMdd'T'HHmmss'Z' in GMT format or yyyyMMdd for all-day events.
Example: UNTIL=20250818T094500Z means the event repeats until 18 Aug 2025.
- bymonthday integer
- Specifies the day of the month.
- Used when freq is MONTHLY or YEARLY.
- Values range from 1 to 31.
- bymonth integer
- Specifies the month of the year.
- Used when freq is YEARLY.
- Values range from 1 (January) to 12 (December).
Examples:
- For daily recurring event :
"repeat": [{"freq": "daily", "interval": "1", "count": 5}] (Every day for 5 occurrences)
"repeat": [{"freq": "daily", "byday": "MO,TU,WE,TH,FR", "count": 5}] (Every weekday for 5 occurrences) - For weekly recurring event:
"repeat": [{"freq": "weekly", "interval": "1", "byday": "MO,TU", "until": "20241121T040000"}] (Every week on Monday and Tuesday until November 21, 2024) - For monthly recurring event:
"repeat": [{"freq": "monthly", "interval": "1", "bymonthday": 27}] (On the 27th day of every month)
"repeat": [{"freq": "monthly", "byday": "-1TU", "interval": "1", "count": 2}] (Last Tuesday of every month, for 2 occurrences) - For yearly recurring event:
"repeat": [{"freq": "yearly", "interval": "1", "bymonth": 11, "bymonthday": 29, "count": "1"}] (On November 29 every year, for 1 occurrence)
"repeat": [{"freq": "yearly", "byday": "3FR", "bymonth": 11}] (Every third Friday of November each year)
- Allowed values :
Note:
- The following parameters are mandatory when editing an event: dateandtime and etag.
- When adding a recurring break event, the recurrenceid must be included with the eventdata JSON Object in the ICS Format: yyyyMMdd'T'HHmmss'Z' for timed events in GMT format, or yyyyMMdd (if the parent event is a all-day event).
- When editing a recurring break event, the recurrenceid must be included with the eventdata JSON Object in ICS format: yyyyMMdd'T'HHmmss'Z' for timed events in GMT format, or yyyyMMdd (if the parent event is a all-day event). Additionally, the recurrence_edittype should be specified to indicate the desired edit operation (only, all, or following) for regular recurring events. If not specified, the default value is "all".
Note: The recurrence_edittype parameter is not required when creating or editing a recurring break event.
Sample Request
Copiedhttps://calendar.zoho.com/api/v1/calendars/l9WWZCf_SJWcr3uIuBOq5g==/events/fb6ac0a3cc0a42fc95020c18b58a6ac9@zoho.com?
eventdata=
{
"uid":"fb6ac0a3cc0a42fc95020c18b58a6ac9@zoho.com",
"dateandtime":{
"timezone":"Europe/Vienna",
"start":"20170624T050000%2B0200",
"end":"20170624T053000%2B0200"
},
"title":"Test Invitation",
"attendees":[
{
"email":"rebecca@zylker.com",
"status":"NEEDS-ACTION"
}
],
"group_attendees" : [ {"zid" : zid}],
"attach":{
"rmAttachId":"494398000000009015"
}
"rrule":"FREQ=DAILY;COUNT=5;INTERVAL=1",
"description":" This is a test description",
"etag":1500551311825
}
Header:
etag - 1500551311825
Sample Response
Copied{
"events":[
{
"enable_eventmanagement":false,
"role":"organizer",
"calid":"1657000000002003",
"title":"Test Invitation",
"calendar_alarm":false,
"duration":1800000,
"uid":"fb6ac0a3cc0a42fc95020c18b58a6ac9@zoho.com",
"rrule":"FREQ=DAILY;COUNT=5;INTERVAL=1",
"createdby":"paula@zylker.com",
"repeat":[
{
"count":5,
"freq":"daily",
"interval":1,
"until":"20170628T030000Z"
}
],
"end":"20170624T053000",
"dateandtime":{
"timezone":"Europe/Vienna",
"start":"20170624T050000+0200",
"end":"20170624T053000+0200"
},
"lastmodifiedtime":"20170720T114920Z",
"isprivate":false,
"attendees":[
{
"email":"rebecca@zylker.com",
"status":"NEEDS-ACTION"
},
{
"email":"paula@zylker.com",
"status":"ACCEPTED"
}
],
"start":"20170624T050000",
"createdtime":"20170720T11Z",
"organizer":"paula@zylker.com",
"isallday":false,
"modifiedby":"paula@zylker.com",
"etag":1500551360550,
"multiday":false,
"caluid":"l9WWZCf_SJWcr3uIuBOq5g=="
}
]
}