PUT - Update 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 - Full access to events

UPDATE - Updates an event

Parameters

  • eventdataJSONObject, mandatory

    Events data JSON can be passed to update the events data od a particular event in the calendar using the following keys and values.

    Input JSON keys
    • titlestring

      Title of the event to be added.

    • dateandtimeJSONobject, 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- The format should be yyyyMMdd'T'HHmmss'Z' in GMT format or yyyyMMdd (if it is an all-day event).
      • end- The format should be yyyyMMdd'T'HHmmss'Z' in GMT format or yyyyMMdd (if it is an all-day event).
      • timezone- Mention the timezone in which the event is being created.
      • convertToEventTZ boolean, - if true event's original timezone will be maintained.
    • isalldayboolean

      Whether the event is an all-day event(True) or not(False).

      • true - If true, use all-day event format in dateandtime JSONobject.
      • false
    • isprivateboolean

      Whether the event is a private event (true) or not (false). If set as private, the event details will not be shared even when the calendar is made public or shared with others with any permissions except delegate permission.

    • urlstring

      URL details that need to be shared for the event, along with the description, if any. Example: "https://mail.zoho.com"

    • recurrence_edittypestring

      This param is used to edit the repeat events. The possible values are:

      • following - used to edit repeat event future occurrences.
      • only - used to edit any particular occurrence of repeat event
      • all - default value (if recurrence_edittype is not mentioned while editing repeat event, it will edit all occurrences)
    • locationstring

      Location details for the event. Maximum length- 255 characters.

    • descriptionstring

      Description of the event. To provide more details about the event to the attendees. Maximum length- 10000 characters.

    • colorhexadecimal format

      Hex-color for the event. In case, a specific color needs to be provided for the event, different from the default color. Example- #E574B0

    • rrule string

      This param is used to create repeat events. The possible values are:

      • FREQ - DAILY|WEEKLY|MONTHLY|YEARLY
      • INTERVAL - Periodic occurrence (default value is 1 if not mentioned) (ex: 1-> everyday, 2-> 2 days once )
      • COUNT - The no of times the event will occur
      • BYDAY - Days of the week (used when FREQ is WEEKLY, MONTHLY or YEARLY). The values= MO, TU, WE, TH, FR, SA, SU.
      • UNTIL - Unill when the event should occur (used for all types of FREQs) Example: UNTIL=20230818T094500
      • BYSETPOS - occurrence of the week (used when FREQ is MONTHLY or YEARLY). The possible values are: 1 | 2 | 3 | 4 | -1 (1 - First, 2- Second, 3 - Third, 4 - Fourth, -1 - Last)Example: First Monday - 1MO
      • BYMONTHDAY - The day of the month (used when FREQ is MONTHLY or YEARLY). The values are:1 to 31
      • BYMONTH - Month (used when FREQ is YEARLY). The possible values are: 1 to 12 ( 1 - Jan, 12- Dec)

      Examples:

      • For daily recurring event :
        "FREQ=DAILY;COUNT=5;INTERVAL=1" (every 1 day once, ends)
        "FREQ=DAILY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR;COUNT=5" (Every weekday for 5 times)
      • For weekly recurring event:
        "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU;UNTIL=20230817T064600Z" (Every week on Monday,Tuesday Until 17 Aug 2023)
      • For monthly recurring event:
        "FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=17" (Every month on day 17)
        "FREQ=MONTHLY;INTERVAL=1;BYDAY=TU;BYSETPOS=-1;COUNT=2" (Every month on Last Tuesday for 2 times)
      • For yearly recurring event:
        "FREQ=YEARLY;INTERVAL=1;BYDAY=MO;BYSETPOS=3;BYMONTH=7" (Every year on Third Monday of July)
        "FREQ=YEARLY;INTERVAL=1;BYMONTH=7;BYMONTHDAY=17;COUNT=1" (Every July on day 17 for 1 Times)
    • attendees JSONArray

      This param is used to include the attendee details for the event. This JSONArray includes below params as JSONObject.

      • email string - The email id of the attendee (mandatory).
      • zid long- The zuid of the attendee.
      • permission - The attendee's permission for the event from the options - 0|1|2|3.
        • 0 - Guest
        • 1 - View
        • 2 - Invite
        • 3 - Edit
      • attendence- 0|1|2
        • 0- Non participant
        • 1- Required participant
        • 2 - Optional participant
      • status - used to update the status of the attendee. The possible values are- NEEDS-ACTION|ACCEPTED|DECLINED|TENTATIVE.

      Example: "attendees": [{"email":"user1@domain.com", "permission":"1"},{"email":"user2@domain.com","permission":"1"}]

      Note:

      Each attendee's details have to be mentioned as a separate JSONObject.

    • group_attendeesJSONArray

      This param is used to include the Group attendees to whom the event invitation should be sent. This JSONArray includes below params as JSONObject:

      • zid- The zuid of the group.(mandatory)
      • Example: "group_attendees":[{"zid":"123565"}]
    • isrep boolean

      Whether the event is a repeating event (true) or a one-time event (false). When the value false is chosen, the repeat will break and the event is converted into a one time event. The rrule param should not be used when the isrep value is false. 

    • repeatJSONArray (Use either rrule or repeat param to add repeat events)

      Use this array to add repeat events. This JSONArray includes below params as JSONObject:

      • freq - daily|weekly|monthly|yearly (mandatory).
      • count - Mentions the number of times the event should repeat. For example,when you want this event to repeat everyday for 5days, the count value should be 5.
      • interval - Periodic occurrence. For example, if you want the event to repeat every 3 days once, the interval value is 3.
      • until- The date until which the event needs to repeat. The format should be yyyyMMdd'T'HHmmss'Z' in GMT format or yyyyMMdd (if it is an allday event)
      • byday - Used in monthly and yearly events. For example, 4FR i.e fourth friday.
      • bymonthday - Used in monthly and yearly events. For example,28 i.e On day 28. The possible values are 1-31
      • bymonth - Used in yearly events. The possible values are 1|2|3|4|5|6|7|8|9|10|11|12

      Example: "repeat": [{"freq": "yearly", "bymonth": "4", "bymonthday": "28", "interval": 1}]

    • recurrenceid boolean

      Used to edit single and following instances. Example: 20230104T114100Z (ICS Format - yyyyMMdd'T'HHmmss'Z' in GMT format or yyyyMMdd (if the parent event is all day event))

    • reminders JSONArray

      Type of reminders to be set for the event. This JSONArray includes the below params as JSONObject:

      • action - email|popup|notification
      • minutes - int - mandatory
    • etag longmandatory

      Event tag to identify the mode in which the event was created/ modified(always send latest etag).

      Note:

      etag- etag value of the event previously received in the API response. (Header need not be sent if "etag" is present in eventdata)

    • calendar_alarm boolean

      Whether to add a calendar alarm (true) or not (false)

    • notify_attendee int

      Used to notify the attendees of the event. The possible values are 0|1|2,

      • 0- None
      • 1- Notify attendees only
      • 2- Notify attendees and myself
    • attach JSONObject

      Used to attach files to an event

      • fileId -string, The format should be comma(,) separated fields. (Use attach API to get the fileId value)
      • rmAttachId -string, The format should be comma(,) separated fields.(Used to remove the attachment from an event)
    • conference string

      The possible values are - zmeeting|none

    • transparency int

      Whether the event should be added to the free/busy schedule. The possible values are,

      • 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.
    • notifyType int

      The values is - 1

      • DEFAULT_NOTIFICATION(1)
    • allowForwarding boolean

      Whether the attendees are allowed to forward the event(true) or not (false).

    • old_caluid

      It is used to change the calendar in which the event is created.

Note:

  • For Status updates of invited events, the organizer must be specified in the request.
  • dateandtime, estatus, etag - mandatory params for edit event.

Note:

When adding a recur break event, the 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)

When editing a recur break event, the 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) & recurrence_edittype should also be sent to do the desired edit operation (only | all | following). By default it's considered as 'only'. recurrence edit type is unnecessary while creating a break event or editing a break event.

To remove the conference, the conference must be sent as "none".

Sample Request

Copiedhttps://calendar.zoho.com/api/v1/calendars/l9WWZCf_SJWcr3uIuBOq5g==/events/fb6ac0a3cc0a42fc95020c18b58a6ac9@zoho.com?
eventdata=
{
 "estatus":"updated",
 "uid":"fb6ac0a3cc0a42fc95020c18b58a6ac9@zoho.com",
 "dateandtime":{
  "timezone":"Europe/Vienna",
  "start":"20170624T050000%2B0200",
  "end":"20170624T053000%2B0200"
 },
 "title":"Test Invitation",
 "attendees":[
  {
   "email":"eziltest@zoho.com",
   "status":"NEEDS-ACTION"
  }
 ],
"group_attendees" : [ {"zid" : zid}],
"attach":{
    "rmAttachId":"494398000000009015"
}
 "rrule":"FREQ=DAILY;COUNT=5;INTERVAL=1",
 "organizer":"ezilkannan.r@zohocorp.com",
 "description":"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":"ezilkannan.r@zohocorp.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":"eziltest@zoho.com",
     "status":"NEEDS-ACTION"
    },
    {
     "email":"ezilkannan.r@zohocorp.com",
     "status":"ACCEPTED"
    }
   ],
   "start":"20170624T050000",
   "createdtime":"20170720T11Z",
   "estatus":"updated",
   "organizer":"ezilkannan.r@zohocorp.com",
   "isallday":false,
   "modifiedby":"ezilkannan.r@zohocorp.com",
   "etag":1500551360550,
   "multiday":false,
   "caluid":"l9WWZCf_SJWcr3uIuBOq5g=="
  }
 ]
}