PUT - Share calendar
Purpose
This API is used to update the calendar that is shared with another user.
Request URL
https://calendar.zoho.com/api/v1/calendars/<CALENDAR_UID>/share
OAuth Scope
scope=ZohoCalendar.calendar.ALL
(or)
scope=ZohoCalendar.calendar.UPDATE
ALL - Full access to calendars
UPDATE - Updates a calendar
Path Parameter
- calendaruidstring, mandatory
- Calendar unique identifier. The calendaruid of the calendar for which the share details should be updated.
Parameters
- shareDataJSON, mandatory
- shareData is a mandatory JSON Object that has the following key parameters:
- privilege
- type*
- mode
- mailid
- zgid
- * - Mandatory parameters
- shareData is a mandatory JSON Object that has the following key parameters:
- privilegestring, optional
- The privilege with which the calendar should be shared.
- The allowed values are:
- freebusy - Can view only the free/ busy information of the user whose calendar is shared.
- view - Can only view the events and event details in the calendar. (Read only access)
- moderate - Can add new events to the calendar shared or view/ modify/ delete the existing event details in the calendar.
- delegate - Apart from the privileges for edit permission, the delegate privilege allows further sharing of the calendar with other users.
- The values moderate and delegate can be used only when you share calendars with a user and not with groups.
- typestring, mandatory
- A calendar can be shared either with a user or a group. The type parameter indicates who the calendar is shared with.
- The allowed values are:
- user - To share the calendar with an individual using their email address.
- group - To share the calendar with a groups using the group ID.
- modestring, optional
- This parameter is used to add or delete a user or group with whom the calendar is shared
- The allowed values are:
- add - To share the calendar with an individual or group using their email address or group ID.
- edit - To edit the existing privilege of a user or group.
- delete - To delete a user or group from the calendar's sharing list.
- mailidstring, optional
- This parameter is used to share the calendar to an individual with the help of their email address.
- Example: rebecca@zylker.com, xyz@zohocorp.org.in
- zgidlong, optional
- This parameter is used to share the calendar to a group with the help of the group's ID.
- Example: 832147
Sample Request
Copiedhttps://calendar.zoho.com/api/v1/calendars/calendaruid/share?shareData=<shareData>
Sample Input - User
Copiedhttps://calendar.zoho.com/api/v1/calendars/1683be4ab6c74d2ab02e6440a0b34d4a/share?shareData={"mailid":"user@domain.com","privilege":"view","type":"user", "mode":"edit"}
Sample Input - Group
Copiedhttps://calendar.zoho.com/api/v1/calendars/1683be4ab6c74d2ab02e6440a0b34d4a/share?shareData={"zgid": "73369916", "type": "group", "mode": "add", "privilege": "view"}
Sample Response
Copied{
"share": [
{
"message": "Updated Successfully",
"status": "success"
}
]
}