POST - Create a New Calendar
Purpose
This API is used to create a new personal calendar.
Request URL
https://calendar.zoho.com/api/v1/calendars
OAuth Scope
scope=ZohoCalendar.calendar.ALL
(or)
scope=ZohoCalendar.calendar.CREATE
ALL - Grants full access to calendars
CREATE - Grants access to create a calendar
Request Parameters
- calendarData JSONobject, mandatory
The calendarData JSONobject can be passed to create a new personal calendar using the following keys.
Input JSON keys
- namestring, mandatory
- Specifies the name of the calendar.
- The maximum length of the word can be 50.
- colorstring, mandatory
- Specifies the Hex code of the preferred color.
- Format : #RRGGBB. Example: #000000 for black, #FFFFFF for white.
- include_infreebusyboolean
- Specifies whether this calendar should be considered for your Free/Busy.
- Allowed values
- true - All events in this calendar will be considered "Busy".
- false - All events in this calendar will be considered "Free".
- privatestring
- Specifies whether the calendar can have a private URL or not. When a Calendar is made publicly viewable, it can still be accessible from a private URL for the other users with whom the calendar is shared with other permissions.
- Allowed values :
- enable- Calendar can be accessed through a private URL.
- disable- Calendar cannot be accessed through a private URL.
- timezonestring
- Specifies the timezone information for the calendar that should be created.
Example: Asia/Kolkata
- Specifies the timezone information for the calendar that should be created.
- publicstring
- Specifies the visibility level of the calendar and its accessibility to public users.
- Allowed values :
- disable - The calendar is not accessible via a public URL. Events in this calendar will not be visible to shared users.
- freebusy - The public URL is accessible. Events in this calendar will be shown as Busy to shared users.
- view - The public URL is accessible, and all event details are visible to shared users.
- descriptionstring
- Specifies the description of the calendar.
- The maximum length of the description can be 1000.
- textcolorstring
- Specifies the Hex code of the preferred text color.
- remindersJSONArray
- Specifies the type of reminders to be set for the event.
- This JSON Array includes below params as JSONObject:
- action string
- Allowed values: email or notification or popup
- minutes integer, mandatory
- This should contain either positive(after) or negative(before) value.
- This parameter is mandatory only if reminders parameter is specified in calendarData JSON object.
- action string
Example: [{"action":"email|popup|notification","minutes":+15}]
- statusboolean
- Determines whether all events in the calendar should be visible.
- Allowed values :
- true- enabled . This setting displays all events in the calendar (default).
- false- disabled. This setting hides all events in the calendar.
Sample Request
Copiedhttps://calendar.zoho.com/api/v1/calendars?calendarData={"name":"New Calendar","color":"#101010","textcolor":"#FFFFFF","include_infreebusy":"true","timezone":"Asia/calcutta","description":"New Calendar","private":"enable","visibility":"true","public":"freebusy","reminders":[{"action":"email","minutes":15}]}
Sample Response
Copied{
"calendars": [
{
"owner": "58875431",
"reminders": [
{
"minutes": "+15",
"action": "email"
}
],
"color": "#101010",
"visibility": true,
"timezone": "Asia/calcutta",
"textcolor": "#FFFFFF",
"include_infreebusy": true,
"description": "New Calendar",
"type": 0,
"uid": "2468c1df20934b42829fe429343d8c3b",
"calendar_createdtime": 1612457951646,
"name": "New Calendar",
"alarm": [
{
"action": "email",
"trigger": "+900000"
}
],
"ctag": 0,
"isdefault": false,
"calendar_modifiedtime": 1612457951646,
"id": "2231390000003017005",
"category": "own",
"status": true,
"order": 7,
"caltype": "own",
"lastmodifiedtime": "19700101T000000Z"
}
]
}