Calendars
Represents a calendar under an End User Account.
The Calendar model
Properties
- Name
id- Type
- string
- Description
Unique identifier of the calendar. Read-Only
- Name
name- Type
- string
- Description
Display name of the calendar.
- Name
hexColor- Type
- string
- Description
Hexadecimal color code representing the calendar's color.
- Name
readOnly- Type
- boolean
- Description
Indicates whether the calendar is a read-only calendar. Read-Only
- Name
isPrimary- Type
- boolean
- Description
Indicates whether this calendar is the primary calendar within this End User Account. Read-Only
- Name
isShared- Type
- boolean
- Description
Indicates whether the calendar is a shared calendar to this End User Account. Read-Only
- Name
timeZone- Type
- string
- Description
Time zone associated with the calendar.
- Name
inviteEmail- Type
- string
- Description
Email address used for calendar invitations to and from this calendar. Read-Only
- Name
allowedOnlineMeetingProviders- Type
- string[]
- Description
List of allowed online meeting providers for this calendar. Read-Only
- Name
defaultOnlineMeetingProvider- Type
- string
- Description
Default online meeting provider used for this calendar. Read-Only
List Calendars
This endpoint retrieves a paginated list of all Calendars associated with this End User Account.
Optional query parameters
- Name
syncToken- Type
- string
- Description
Token used at a later point in time to retrieve only the entries that have changed since this result was returned. Omitted if further results are available, in which case nextPageToken is provided.
Request
curl -X GET https://api.onecalunified.com/api/v1/calendars/:endUserAccountId \
-H "x-api-key: {apiKey}"
Response
{
"data": [
{
"id": "shared_calendar_1@group.calendar.google.com",
"name": "Shared Calendar",
"readOnly": false,
"hexColor": "#7bd148",
"inviteEmail": "shared_calendar_1@group.calendar.google.com",
"isShared": true,
"timeZone": "Europe/Tirane",
"allowedOnlineMeetingProviders": ["hangoutsMeet"]
},
{
"id": "en.generic#holiday@group.v.calendar.google.com",
"name": "Holidays",
"readOnly": true,
"hexColor": "#9a9cff",
"inviteEmail": "en.generic#holiday@group.v.calendar.google.com",
"isShared": true,
"timeZone": "Europe/Tirane",
"allowedOnlineMeetingProviders": ["hangoutsMeet"]
},
{
"id": "johndoe@example.com",
"name": "johndoe@example.com",
"readOnly": false,
"hexColor": "#0e61b9",
"inviteEmail": "johndoe@example.com",
"isPrimary": true,
"isShared": false,
"timeZone": "Europe/Tirane",
"allowedOnlineMeetingProviders": ["hangoutsMeet"]
}
],
"nextSyncToken": "example_sync_token"
}
Get Calendar
This endpoint returns the details of a specific Calendar.
Path parameters
- Name
calendarId- Type
- string
- Description
The unique identifier of the Calendar to retrieve.
Request
curl -X GET https://api.onecalunified.com/api/v1/calendars/user_account_1/calendar_1 \
-H "x-api-key: {apiKey}"
Response
{
"id": "calendar_1",
"name": "Shared Calendar",
"readOnly": false,
"hexColor": "#7bd148",
"inviteEmail": "shared_calendar_1@group.calendar.google.com",
"isShared": true,
"timeZone": "Europe/Tirane",
"allowedOnlineMeetingProviders": ["hangoutsMeet"]
},
Create a new Calendar
Creates a new Calendar under the specified End User Account.
Request body
This endpoint accepts the same properties as the Calendar model except the properties marked as Read-Only.
Request
curl https://api.onecalunified.com/api/v1/calendars/user_account_1 \
-H "x-api-key: {apiKey}" \
-H "Content-Type: application/json" \
-X POST \
-d '{"name": "Created from API", "timeZone": "America/New_York"}'
Response
{
"id": "calendar_1",
"name": "Created from API",
"readOnly": false,
"inviteEmail": "ff0d6a10e05abaed040a36fc68270bc6b0001b9dea9971162be8df0d5d5721312@group.calendar.google.com",
"isShared": false,
"timeZone": "America/New_York",
"allowedOnlineMeetingProviders": [
"hangoutsMeet"
]
}
Update a Calendar
Updates an existing Calendar under the specified End User Account.
Request body
This endpoint accepts the same properties as the Calendar model except the properties marked as Read-Only. You only need to provide the properties you want to update.
Request
curl https://api.onecalunified.com/api/v1/calendars/user_account_1/calendar_1 \
-H "x-api-key: {apiKey}" \
-H "Content-Type: application/json" \
-X PUT \
-d '{"name": "Updated Name", "timeZone": "America/Los_Angeles"}'
Response
{
"id": "calendar_1",
"name": "Updated Name",
"readOnly": false,
"inviteEmail": "ff0d6a10e05abaed040a36fc68270bc6b0001b9dea9971162be8df0d5d5721312@group.calendar.google.com",
"isShared": false,
"timeZone": "America/Los_Angeles",
"allowedOnlineMeetingProviders": [
"hangoutsMeet"
]
}
Delete a Calendar
Deletes an existing Calendar under the specified End User Account.
Request body
This endpoint accepts the same properties as the Calendar model except the properties marked as Read-Only. You only need to provide the properties you want to update.
Request
curl https://api.onecalunified.com/api/v1/calendars/user_account_1/calendar_1 \
-H "x-api-key: {apiKey}" \
-H "Content-Type: application/json" \
-X DELETE \
Response
{
"success": true
}