Skip to content

Google: Inserts an existing calendar into the user's calendar list

Google calendarCalendarList.calendarCalendarListInsert: arguments, response, policy and SDK examples.

← Calendar calendar list operations · Get started

Operation google.calendar_calendarlist_insert

Provider route: POST /calendar/v3/users/me/calendarList. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/google with npm, or alter-sdk-google with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { GoogleIntegration } from "@alter-ai/google";
async function execute(input: Parameters<GoogleIntegration["calendarCalendarList"]["calendarCalendarListInsert"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new GoogleIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.calendarCalendarList.calendarCalendarListInsert(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_google import GoogleIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = GoogleIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.calendar_calendar_list.calendar_calendar_list_insert(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryModelOptionalExpand Updates an existing calendar on the user’s calendar list — request body — query
bodyModelRequired within parentExpand Inserts an existing calendar into the user’s calendar list — request body — body

Referenced models: Inserts an existing calendar into the user’s calendar list — request body — body, Updates an existing calendar on the user’s calendar list — request body — query

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Returns a calendar from the user’s calendar list — response body

Referenced models: Returns a calendar from the user’s calendar list — response body

4 more schemas are linked from the tables above, on the schema pages.

Returns a calendar from the user's calendar list — response body
FieldTypePresenceDescription and constraints
$objectRoot
accessRolestringOptionalThe effective access role that the authenticated user has on the calendar. Read-only. Possible values are:
- "freeBusyReader" - Provides read access to free/busy information.
- "reader" - Provides read access to the calendar. Private events will appear to users with reader access, but event details will be hidden.
- "writerWithoutPrivateAccess" - Provides read and write access to the calendar. Private events will appear to users with writerWithoutPrivateAccess access, but event details will be hidden.
- "writer" - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible.
- "owner" - Provides manager access to the calendar. This role has all of the permissions of the writer role with the additional ability to see and modify access levels of other users.
Important: the owner role is different from the calendar's data owner. A calendar has a single data owner, but can have multiple users with owner role.
autoAcceptInvitationsbooleanOptionalWhether this calendar automatically accepts invitations. Only valid for resource calendars. Read-only.
backgroundColorstringOptionalThe main color of the calendar in the hexadecimal format "#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.
colorIdstringOptionalThe color of the calendar. This is an ID referring to an entry in the 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.
conferencePropertiesModelOptionalExpand Returns metadata for a calendar — response body — conference Properties
Conferencing properties for this calendar, for example what types of conferences are allowed.
dataOwnerstringOptionalThe email of the owner of the calendar. Set only for secondary calendars. Read-only.
defaultRemindersarrayOptionalThe default reminders that the authenticated user has for this calendar.
defaultReminders[]ModelEach itemExpand Returns events on the specified calendar — response body — default Reminders item
deletedbooleanOptionalWhether this calendar list entry has been deleted from the calendar list. Read-only. Optional. The default is False.
Default: false
descriptionstringOptionalDescription of the calendar. Optional. Read-only.
etagstringOptionalETag of the resource.
foregroundColorstringOptionalThe foreground color of the calendar in the hexadecimal format "#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.
hiddenbooleanOptionalWhether the calendar has been hidden from the list. Optional. The attribute is only returned when the calendar is hidden, in which case the value is true.
Default: false
idstringOptionalIdentifier of the calendar.
kindstringOptionalType of the resource ("calendar#calendarListEntry").
Default: calendar#calendarListEntry
locationstringOptionalGeographic location of the calendar as free-form text. Optional. Read-only.
notificationSettingsobjectOptionalThe notifications that the authenticated user is receiving for this calendar.
notificationSettings.notificationsarrayOptionalThe list of notifications set for this calendar.
notificationSettings.notifications[]ModelEach itemExpand Returns a calendar from the user's calendar list — response body — notification Settings notifications item
primarybooleanOptionalWhether the calendar is the primary calendar of the authenticated user. Read-only. Optional. The default is False.
Default: false
selectedbooleanOptionalWhether the calendar content shows up in the calendar UI. Optional. The default is False.
Default: false
summarystringOptionalTitle of the calendar. Read-only.
summaryOverridestringOptionalThe summary that the authenticated user has set for this calendar. Optional.
timeZonestringOptionalThe time zone of the calendar. Optional. Read-only.

Referenced models: Returns a calendar from the user's calendar list — response body — notification Settings notifications item, Returns metadata for a calendar — response body — conference Properties, Returns events on the specified calendar — response body — default Reminders item

Inserts an existing calendar into the user's calendar list — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
accessRolestringOptionalThe effective access role that the authenticated user has on the calendar. Read-only. Possible values are:
- "freeBusyReader" - Provides read access to free/busy information.
- "reader" - Provides read access to the calendar. Private events will appear to users with reader access, but event details will be hidden.
- "writerWithoutPrivateAccess" - Provides read and write access to the calendar. Private events will appear to users with writerWithoutPrivateAccess access, but event details will be hidden.
- "writer" - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible.
- "owner" - Provides manager access to the calendar. This role has all of the permissions of the writer role with the additional ability to see and modify access levels of other users.
Important: the owner role is different from the calendar's data owner. A calendar has a single data owner, but can have multiple users with owner role.
autoAcceptInvitationsbooleanOptionalWhether this calendar automatically accepts invitations. Only valid for resource calendars. Read-only.
backgroundColorstringOptionalThe main color of the calendar in the hexadecimal format "#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.
colorIdstringOptionalThe color of the calendar. This is an ID referring to an entry in the 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.
conferencePropertiesModelOptionalExpand Returns metadata for a calendar — response body — conference Properties
Conferencing properties for this calendar, for example what types of conferences are allowed.
dataOwnerstringOptionalThe email of the owner of the calendar. Set only for secondary calendars. Read-only.
defaultRemindersarrayOptionalThe default reminders that the authenticated user has for this calendar.
defaultReminders[]ModelEach itemExpand Updates an existing calendar on the user's calendar list — request body — body default Reminders item
deletedbooleanOptionalWhether this calendar list entry has been deleted from the calendar list. Read-only. Optional. The default is False.
Default: false
descriptionstringOptionalDescription of the calendar. Optional. Read-only.
etagstringOptionalETag of the resource.
foregroundColorstringOptionalThe foreground color of the calendar in the hexadecimal format "#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.
hiddenbooleanOptionalWhether the calendar has been hidden from the list. Optional. The attribute is only returned when the calendar is hidden, in which case the value is true.
Default: false
idstringRequired within parentIdentifier of the calendar.
kindstringOptionalType of the resource ("calendar#calendarListEntry").
Default: calendar#calendarListEntry
locationstringOptionalGeographic location of the calendar as free-form text. Optional. Read-only.
notificationSettingsobjectOptionalThe notifications that the authenticated user is receiving for this calendar.
notificationSettings.notificationsarrayOptionalThe list of notifications set for this calendar.
notificationSettings.notifications[]ModelEach itemExpand Returns a calendar from the user's calendar list — response body — notification Settings notifications item
primarybooleanOptionalWhether the calendar is the primary calendar of the authenticated user. Read-only. Optional. The default is False.
Default: false
selectedbooleanOptionalWhether the calendar content shows up in the calendar UI. Optional. The default is False.
Default: false
summarystringOptionalTitle of the calendar. Read-only.
summaryOverridestringOptionalThe summary that the authenticated user has set for this calendar. Optional.
timeZonestringOptionalThe time zone of the calendar. Optional. Read-only.

Referenced models: Returns a calendar from the user's calendar list — response body — notification Settings notifications item, Returns metadata for a calendar — response body — conference Properties, Updates an existing calendar on the user's calendar list — request body — body default Reminders item

Updates an existing calendar on the user's calendar list — request body — query
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
fieldsstringOptionalSelector specifying which fields to include in a partial response.
prettyPrintbooleanOptionalReturns response with indentations and line breaks.
Default: true
quotaUserstringOptionalAn opaque string that represents a user for quota purposes. Must not exceed 40 characters.
userIpstringOptionalDeprecated. Please use quotaUser instead.
colorRgbFormatbooleanOptionalWhether to use the 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.

SDK function policy ID: google.calendar_calendarlist_insert. Catalog operation: calendar.calendarList.insert. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.calendarlist"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.