Inserts an existing calendar into the user's calendar list. Try it now .
Request
HTTP request
POST https://www.googleapis.com/calendar/v3/users/me/calendarList
Parameters
colorRgbFormat
boolean
foregroundColor
and backgroundColor
fields to write the calendar colors (RGB). If this feature is used, the index-based colorId
field will be set to the best matching option automatically. Optional. The default is False.Authorization
This request requires authorization with at least one of the following scopes:
Scope |
---|
https://www.googleapis.com/auth/calendar
|
https://www.googleapis.com/auth/calendar.calendarlist
|
For more information, see the authentication and authorization page.
Request body
In the request body, supply a CalendarList resource with the following properties:
id
string
backgroundColor
string
#0088aa
". This property supersedes the index-based colorId
property. To set or change this property, you need to specify colorRgbFormat=true
in the parameters of the insert
, update
and patch
methods. Optional.colorId
string
calendar
section of the colors definition (see the colors endpoint
). This property is superseded by the backgroundColor
and foregroundColor
properties and can be ignored when using these properties. Optional.defaultReminders[]
list
defaultReminders[].
method
string
- "
email
" - Reminders are sent via email. - "
popup
" - Reminders are sent via a UI popup.
Required when adding a reminder.
defaultReminders[].
minutes
integer
Required when adding a reminder.
foregroundColor
string
#ffffff
". This property supersedes the index-based colorId
property. To set or change this property, you need to specify colorRgbFormat=true
in the parameters of the insert
, update
and patch
methods. Optional.notificationSettings
object
notificationSettings.notifications[].
method
string
- "
email
" - Notifications are sent via email.
Required when adding a notification.
notificationSettings.notifications[].
type
string
- "
eventCreation
" - Notification sent when a new event is put on the calendar. - "
eventChange
" - Notification sent when an event is changed. - "
eventCancellation
" - Notification sent when an event is cancelled. - "
eventResponse
" - Notification sent when an attendee responds to the event invitation. - "
agenda
" - An agenda with the events of the day (sent out in the morning).
Required when adding a notification.
selected
boolean
summaryOverride
string
Response
If successful, this method returns a CalendarList resource in the response body.
Try it!
Use the APIs Explorer below to call this method on live data and see the response.