Introduction to the Calendar API
Start with our Core API docs for an introduction to the Kloudless API and more information on connecting user accounts and performing API requests.
Once an account is connected to your application, your application can begin making requests to the Calendar API endpoints listed below.
We support the following services denoted by the friendly name and identifier:
- Calendar Services
- Google Calendar:
google_calendar
- Outlook Calendar:
outlook_calendar
- CalDAV:
caldav
- Exchange Server 2013+:
exchange
- iCloud Calendar:
icloud_calendar
- Google Calendar:
We support the following endpoints and their corresponding unified objects:
Please see the specific resource documentation for what attributes are unified.
Kloudless object attributes that are absent in the upstream service
will be null
when retrieved, and ignored when sent in create/update requests.
In addition, we can provide the original JSON response from the upstream
service, which we call raw data. Please set the
raw data
header option when performing API requests, and the server will return the raw
data in the the JSON response object under the raw
key field.
Similarly, raw data can be sent directly to the upstream service via the API when creating or updating objects. This is primarily for attributes that are not unified in the Kloudless APIs. The request body must contain a nested JSON object with the upstream attribute names and values. Please see the example below:
javascript
{
"raw": {
"object": {
...
"upstream-name": "upstream-values",
...
}
}
}
We define this nested object with the shorthand: raw
-> object
.
We’ve included links for the raw
-> object
mappings for each service below:
-
google_calendar
(Raw Calendar Object, Raw Event Object) -
outlook_calendar
(Raw Calendar Object, Raw Event Object)
We also support two additional endpoints that are unique to Kloudless:
-
Find Availability Find available time slots for calendars with specific time constraints.
-
Activity Monitoring Retrieve the latest activity for a calendar for sync, automation, or other use cases.
Quickstart
Begin by connecting a user’s account using the
Kloudless OAuth
authentication endpoints. You can then
retrieve their primary calendar’s events
by using the URL path /accounts/me/cal/calendars/primary/events
with a
specific start
and end
time.
-
Monitor any changes to the user’s calendar via the Activity Stream to implement features such as calendar sync. See the Google Calendar Quick Start guide for an example of how this can be done.
-
Find calendar availabilities to schedule meetings easily with the
/availability
endpoint. -
You can also use our Meeting Scheduler UI Tool to let your users schedule meetings within your app: https://github.com/Kloudless/meeting-scheduler
Calendars
A Calendar object contains metadata about a user’s online calendar and has the following attributes:
-
id
Unique identifier for the calendar.primary
can be used as an alias for theid
of the user’s primary calendar. -
account_id
The ID of the account that the calendar is associated with. -
name
Name of the calendar (required). -
description
Additional details about the calendar. (only supported forgoogle_calendar
andcaldav
). -
location
Geographic location of the calendar as free-form text. (only supported forgoogle_calendar
). -
timezone
The time zone of the calendar (IANA Time Zone Database name. Only supported forgoogle_calendar
andcaldav
). -
raw
Underlying object retrieved from the service.exchange
only returns the raw ID. -
type
Will always becalendar
. -
api
Will always becalendar
. -
href
The absolute URL to get the object’s metadata.
List Calendars
This endpoint lists calendars the user has subscribed to in their account.
Note that only calendars added by the user to their account are visible via this endpoint. To obtain access to all of a user’s coworkers’ calendars instead, see the notes below on accessing all calendars in a tenant.
The response to an API request to this endpoint contains the following information:
-
count
Integer. Number of objects on this page. -
page
String. Page identifier. -
next_page
The value to provide in the request’spage
query parameter for the next page. This will benull
if there are no more pages. -
objects
Array. List of objects.
- Parameters
- page_size
number
(optional) Default: 100Number of objects in each page. The
page_size
is treated as advisory and may not be strictly adhered to, depending on the upstream service’s capabilities. Thepage_size
must be between1
and1000
.- page
string
(optional)Page to return. If
page
is not specified, the first page is returned, containingpage_size
objects. To retrieve pages after the first page, setpage
to the value ofnext_page
returned in the previous response.
- Response
200
Toggle Headers
Content-Type: application/json
Body
{ "count": 3, "next_page": null, "objects": [ { "id": "fI2NvbnRhY3RzQGdyb3VwLnYuY2FsZW5kYXIuZ29vZ2xlLmNvbQ==", "name": "Contacts", "description": null, "location": null, "timezone": "America/Los_Angeles", "account_id": "123", "api": "calendar", "type": "calendar", "href": "https://api.kloudless.com/v1/accounts/123/cal/calendars/fI2NvbnRhY3RzQGdyb3VwLnYuY2FsZW5kYXIuZ29vZ2xlLmNvbQ==" }, { "id": "fZW4udXNhI2hvbGlkYXlAZ3JvdXAudi5jYWxlbmRhci5nb29nbGUuY29t", "name": "Holidays in United States", "description": null, "location": null, "timezone": "America/Los_Angeles", "account_id": "123", "api": "calendar", "type": "calendar", "href": "https://api.kloudless.com/v1/accounts/123/cal/calendars/fZW4udXNhI2hvbGlkYXlAZ3JvdXAudi5jYWxlbmRhci5nb29nbGUuY29t" }, { "id": "a2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=", "name": "My Calendar", "description": "A calendar for events", "location": "San Francisco, CA", "timezone": "US/Pacific", "account_id": "123", "api": "calendar", "type": "calendar", "href": "https://api.kloudless.com/v1/accounts/123/cal/calendars/a2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=" } ], "page": "1", "type": "object_list", "api": "calendar" }
Create a Calendar
To create a calendar, perform a POST request containing a JSON object with the following parameters:
-
name
: Name of the calendar -
description
: Description of the calendar -
location
: Geographic location of the calendar -
timezone
: Timezone of the calendar -
raw
: A JSON object containing raw attribute names and values. Useraw
to specify values for upstream service attributes that are not unified by the Kloudless API, i.e., attributes not already listed here.
Here is an example request:
curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
'https://api.kloudless.com/v1/accounts/me/cal/calendars' \
-XPOST -d '{
"name": "My Calendar",
"description": "A calendar for events",
"location": "San Francisco, CA",
"timezone": "US/Pacific",
"raw": {
"object": {
"color": 1
}
}
}'
Note: exchange
only supports name
- RequestToggle
Headers
Authorization: Bearer [TOKEN]
Content-Type: application/jsonBody
{ "name": "My Calendar", "description": "A calendar for events", "location": "San Francisco, CA", "timezone": "US/Pacific" }
- Response
201
Toggle Headers
Content-Type: application/json
Body
{ "id": "a2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=", "name": "My Calendar", "description": "A calendar for events", "location": "San Francisco, CA", "timezone": "US/Pacific", "account_id": "123", "api": "calendar", "type": "calendar", "href": "https://api.kloudless.com/v1/accounts/123/cal/calendars/a2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=" }
Retrieve a Calendar
- Response
200
Toggle Headers
Content-Type: application/json
Body
{ "id": "a2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=", "name": "My Calendar", "description": "A calendar for events", "location": "San Francisco, CA", "timezone": "US/Pacific", "account_id": "123", "api": "calendar", "type": "calendar", "href": "https://api.kloudless.com/v1/accounts/123/cal/calendars/a2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=" }
Update a Calendar
To update a calendar, create a JSON object with any of the following properties:
-
name
-
description
-
location
-
timezone
-
raw
The new object will be returned on success.
Example request:
curl -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-XPATCH -d '{
"name": "My Calendar",
"description": "A calendar for my events"
}' \
'https://api.kloudless.com/v1/accounts/me/cal/calendars/primary'
NOTE: not supported in exchange
- RequestToggle
Headers
Authorization: Bearer [TOKEN]
Content-Type: application/jsonBody
{ "name": "My Calendar", "description": "A calendar for events" }
- Response
200
Toggle Headers
Content-Type: application/json
Body
{ "id": "a2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=", "name": "My Calendar", "description": "A calendar for events", "location": "San Francisco, CA", "timezone": "US/Pacific", "account_id": "123", "api": "calendar", "type": "calendar", "href": "https://api.kloudless.com/v1/accounts/123/cal/calendars/a2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=" }
Delete a Calendar
Example request:
curl -L -H 'Authorization: Bearer [TOKEN]' \
-XDELETE https://api.kloudless.com/v1/accounts/me/cal/calendars/456
- Response
204
Events
An Event object represents metadata about an entry on a user’s online calendar. Event objects are commonly associated with a title, start and end times, attendees, and frequency.
An event has the following attributes:
-
id
Unique identifier for the event. -
account_id
The ID of the account that the event is associated with. -
ical_uid
A read-only unique identifier for the event as defined in RFC 5545. This identifier is unique across different calendars, which is valuable when accessing multiple users’ calendars at once, especially with admin accounts. Note that Outlook Calendar does not respect this attribute for events created by an external organizer, such as a Google Calendar user, and assigns its ownical_uid
instead internal to Office 365. However, events across users within the same calendaring system will maintain the sameical_uid
. -
calendar_id
Unique identifier for the calendar which this event belongs to.primary
can be used as an alias for thecalendar_id
of the user’s primary calendar. -
name
Name of the event. -
description
Details of the event. May be text or HTML. When creating or updating events with an HTML description in Outlook and Exchange, ensure the first character is<
and the last character is>
. This ensures the description is considered to be HTML. When reading events, Kloudless returns text descriptions for Outlook Calendar. To return HTML descriptions for Outlook Calendar, set the raw headerX-Kloudless-Raw-Headers: {"Prefer": "outlook.body-content-type=\"html\""}
. Google Calendar automatically renders text and HTML as appropriate. -
created
ISO 8601 timestamp indicating when the event was created. -
modified
ISO 8601 timestamp indicating when the event was last modified. -
all_day
Only available forgoogle_calendar
andoutlook_calendar
.true
if it’s an all-day event;false
otherwise. Defaults tofalse
. Iftrue
,start
andend
should be ISO 8601 dates rather than timestamps, such as"2020-01-01"
. Iffalse
,start
andend
should be ISO 8601 timestamps, such as"2020-01-01T00:00:00Z"
.Create an all-day event by setting
all_day
totrue
and ensuring the thestart
date is inclusive and theend
date is exclusive. For example, an all-day event that occurs on both 2020-01-01 and 2020-01-02 would needend
to be set to"2020-01-03"
. -
start
ISO 8601 timestamp or date indicating when the event starts (inclusive). The format depends onall_day
although either is accepted during event creation/updates. -
start_time_zone
The IANA time zone database name that corresponds to thestart
time’s time zone. For example,America/Los_Angeles
. This field isn’t supported for all-day events. If the value of this field is not set, the user’s default time zone is used if known (only supported forgoogle_calendar
,outlook_calendar
,exchange
,caldav
, andicloud_calendar
). -
end
ISO 8601 timestamp or date indicating when the event ends (exclusive). The format depends onall_day
although either is accepted during event creation/updates. -
end_time_zone
The IANA time zone database name that corresponds to theend
time’s time zone. For example,America/Los_Angeles
. This field isn’t supported for all-day events. If the value of this field is not set, the user’s default time zone is used if known (only supported forgoogle_calendar
,outlook_calendar
,exchange
,caldav
, andicloud_calendar
). -
original_start
A read-only ISO 8601 timestamp or date present for recurring events that represents the time that the event was originally set up to start at, based on the recurrence data in the master event with IDrecurring_master_id
. Only supported forgoogle_calendar
. -
original_start_time_zone
A read-only IANA time zone database name that corresponds to theoriginal_start
time’s time zone. For example,America/Los_Angeles
. This field isn’t supported for all-day events. -
organizer
A Person object describing the organizer. -
on_organizer_calendar
A boolean value indicating whether this Event represents the calendar event on the calendar of its organizer, rather than the calendar of an attendee. Seeical_uid
for an ID that is consistent across all calendars the event is scheduled on. Only supported forgoogle_calendar
andoutlook_calendar
. -
creator
A Person object describing the creator (only supported ingoogle_calendar
). -
attendees
A list of Person objects describing each attendee. -
location
Geographic location of the calendar as free-form text. -
attachments
A list of File objects attached to the event. -
reminder
(deprecated) When to show the reminder, expressed as minutes before the event start time. (only supported foroutlook_calendar
andexchange
) This will be removed in v2. Please usereminders
instead. -
use_default_reminder
true
to use the calendar’s default reminder;false
otherwise. Only supported forgoogle_calendar
; absent otherwise. Defaults totrue
. Iftrue
,reminders
is ignored. -
reminders
A list of Reminder objects that each contain information on reminders about the event to the user. See notes below on the structure of each Reminder object. The maximum number of reminder objects depend on the service:google_calendar
: up to 5outlook_calendar
,exchange
: only 1caldav
: no limit inherently specified in the protocol although server implementations may vary.icloud_calendar
: no limit, however all calendar and reminder data (not including attachments) cannot exceed 1GB
-
recurrence
A list of Recurrence objects that contain information about a recurring event. The Recurrence object format is documented below this section. -
recurrence_type
-
solo
: A stand-alone event -
recurring
: A recurring event -
recurring_master
: The primary/master event in the series of recurring eventsPlease note that for some
caldav
servers, therecurrence_type
returned may be inconsistent when performing alist events
operation. (Specifically, it is possible that the first event in a series of recurrences is marked as"recurrence_type": "solo"
, which is incorrect.)
-
-
recurring_master_id
The unique identifier for the primary/master event in the series of recurring events. Will be unavailable if the event is not a recurring event or if the event is already the primary/master event in the series. -
custom_properties
A list of custom property objects. Custom properties (some services may call them extended properties) are key-value pairs that allow the user or application to add extra information to calendar events.The following services are currently supported:
google_calendar
outlook_calendar
-
online_meeting
An Online Meeting object, representing online conference information for the event. See below for the structure of an Online Meeting object.The following services are currently supported:
google_calendar
outlook_calendar
-
visibility
Visibility of the event (only supported forgoogle_calendar
)default
: Default visibility of the calendar.public
: The event is public and event details are visible to all readers of the calendar.private
: The event is private and only event attendees may view event details.confidential
: The event is private.
-
transparent
A boolean value indicating if this event blocks time on the calendar.true
: The event does not block time on the calendar and the time is still available.false
: The event does block time on the calendar and the time is not available.
-
status
State of the event {confirmed, cancelled} (only supported forgoogle_calendar
,outlook_calendar
, andexchange
). -
raw
Underlying object retrieved from the service.exchange
only returns the raw ID. -
type
Will always beevent
. -
api
Will always becalendar
. -
href
The absolute URL to get the object’s metadata.
Reminder objects have the following structure:
-
minutes
When to show the reminder, expressed as minutes before the event start time. -
method
The method used to remind the user about this event. Defaults topopup
. The possible values depend on the services:google_calendar
:email
,popup
outlook_calendar
,exchange
:popup
caldav
:email
,popup
icloud_calendar
:email
,popup
-
popup
The description present in the pop-up. Only supported forcaldav
andicloud_calendar
. Required forcaldav
andicloud_calendar
if themethod
ispopup
. -
email
Email object. Only supported forcaldav
andicloud_calendar
. Required forcaldav
andicloud_calendar
if themethod
isemail
. Email Reminder objects have the following structure:summary
The subject text of the emaildescription
The body text of the emailto
A list of recipients’ email addresses
Recurrence objects have the following structure:
-
rrule
An RRULE string in the format described by RFC5545.Outlook Calendar and Exchange limitations: The recurrence rule properties available vary based on the frequency of the recurring event as shown in the table below. The rows represent the properties available when specifying a recurrence pattern with a specific frequency:
DAILY
WEEKLY
MONTHLY
MONTHLY
(relative)YEARLY
YEARLY
(relative)INTERVAL
INTERVAL
INTERVAL
INTERVAL
INTERVAL
INTERVAL
COUNT
COUNT
COUNT
COUNT
COUNT
COUNT
UNTIL
UNTIL
UNTIL
UNTIL
UNTIL
UNTIL
BYDAY
BYMONTHDAY
BYDAY
BYMONTHDAY
BYDAY
WKST
BYSETPOS
BYMONTH
BYMONTH
BYSETPOS
Frequencies and properties not listed above are unsupported.
A Timezone or UTC offset within an RRULE is unsupported and will be ignored. Outlook will use the event’s timezone when expanding the Recurrence pattern.
The data model used by
outlook_calendar
andexchange
is not in the RRULE format and instead uses an object called a patternedRecurrence to define the pattern and range of recurring events. This means that some RRULE properties are not supported, such asHOURLY
,EXDATE
, and others. You can read more about Outlook’s implementation here.
Person objects have the following structure:
-
id
profile ID of the person. -
name
Name of the person. -
email
Email address of the person. -
status
Status of the person’s response to the meeting invitation. One ofaccepted
,declined
,tentative
, orpending
. Present for Person objects included inattendees
. May not be present if unavailable. (only supported forgoogle_calendar
,outlook_calendar
, andexchange
) -
required
A boolean indicating whether this is a required attendee. Present for Person objects included inattendees
. -
resource
Read-only. A boolean indicating whether the attendee is a resource. Present for Person objects included inattendees
.
File objects have the following structure:
-
id
ID of the file -
name
Name of the file -
url
URL to download the file from -
mime_type
Content type of the file
Custom property objects have the following structure:
-
key
A unique string to indicate a key/ID for this custom property -
value
A string to store data -
private
Optional. The default istrue
. This is for Google Calendar to indicate whether this property will be stored inprivate
orshared
. This field is required if you update a Google Calendar event with custom properties.For more info, please refer to Google Calendar Event extendedProperties
Online Meeting objects have the following structure:
-
conference_id
(read-only) A string with the conference ID of the Online Meeting. The ID is provided as received from the upstream service, without additional encoding. -
online_meeting_provider
(required) A string representing a code for this meeting’s provider, specified by the upstream service.For
google_calendar
, possible values are:eventHangout
: Hangouts for consumers (hangouts.google.com)eventNamedHangout
: class Hangouts for Google Workspace (formerly G Suite) users (hangouts.google.com)hangoutsMeet
: Google Meet (meet.google.com)addOn
: Third-party conference providers. Please see the Google Calendar Event docs for more information.
For
outlook_calendar
, possible values are:teamsForBusiness
: Microsoft Teams meetingskypeForBusiness
: Skype for Business callskypeForConsumer
: Skype call (consumer)unknown
: Other (the default foroutlook_calendar
events). Please see the Outlook Calendar Event docs for more information.
-
entry_points
An array of Online Meeting Entry Point objects describing how to access the online conference. Read-only foroutlook_calendar
. Writable forgoogle_calendar
when adding a new Online Meeting, but not updatable. -
notes
(only supported forgoogle_calendar
) A string with any notes associated with the Online Meeting. -
signature
(only supported forgoogle_calendar
) A string with the signature of the Online Meeting, generated by the upstream service.
Online Meeting Entry Point objects have the following structure:
-
uri
(required) A string with the URI of the this Entry Point. May be an HTTP URI forvideo
meetings, a telephone URI beginning withtel:
for dial-in numbers, or an SIP URI beginning withsip:
for joining a conference over SIP. Examples:https://meet.google.com/xxx-yyy-zzz
tel:+1-323-555-0166
tel:+12345678900,,,123456789;1234
sip:12345678@myprovider.com
-
entry_point_type
A string describing the type of Entry Point. Can be one of the following values:video
(the default): Joining a conference over HTTP.phone
: Joining a conference by dialing a telephone number.sip
: Joining a conference over SIP.more
: Further ways to join a conference, such as additional phone numbers.
-
meeting_code
(optional) The meeting code for the Online Meeting. Only applicable forgoogle_calendar
. -
access_code
(optional) The access code for the Online Meeting. Only applicable forgoogle_calendar
. -
passcode
(optional) The passcode for the Online Meeting. Only applicable forgoogle_calendar
. -
password
(optional) The password for the Online Meeting. Only applicable forgoogle_calendar
. -
pin
(optional) The PIN for the Online Meeting. Only applicable forgoogle_calendar
.
Of the fields meeting_code
, access_code
, passcode
, password
, and pin
,
only the ones that match the conference provider’s terminology and are present
are populated by google_calendar
. Similarly, only the appropriate fields
should be populated when creating a google_calendar
event, if needed. This
enables a developer’s application to use the appropriate terminology when
displaying and accepting the conference call’s details.
Event Notifications
An email notification will be sent to all attendees when an event is created,
updated, or deleted. However, if only the attendees
field is
updated, then only specific attendees being added or deleted will receive any
notification.
Currently supported for outlook_calendar
and google_calendar
.
Note: Google Calendar allows users to customize notifications for each
individual calendar.
If a user is not receiving notification emails, please refer the user to their
calendar’s settings.
The settings can be found at:
Google Calendar -> Settings
->
Expand the default calendar under Settings for my calendars
section ->
General notifications
-> set Email
to the event types you want to enable
notifications for.
List Events
/accounts/{account_id}/cal/calendars/{calendar_id}/events{?start,end,page,instances,q}
Apps most commonly need to list events in the user’s primary calendar.
Use the URL path /accounts/me/cal/calendars/primary/events
with a specific
start
and end
time to accomplish this.
For other calendars, obtain the calendar ID in the URL by listing the user’s calendars.
If the calendar account is connected with admin privileges, it is possible to
list events for Resource Calendars. In order to get the ID of the resource’s
Calendar, use the Resource list endpoint and refer
to the calendar
field. Listing resource calendars is supported for the
following services:
-
google_calendar
-
outlook
The response contains the following information:
-
count
Integer. Number of objects on this page. -
page
String. Page identifier. -
next_page
The value to provide in the request’spage
query parameter for the next page. This will benull
if there are no more pages. -
objects
Array. List of objects.
- Parameters
- start
string
(optional)Only events ending after this ISO 8601 timestamp (exclusive) are returned. The default value is the start of Unix Epoch Time (
1970-01-01T00:00:00Z
).- end
string
(optional)Only events starting before this ISO 8601 timestamp (exclusive) are returned. The default value is
null
and retrieves all future events.- page
string
(optional)Page to return. Do not provide a
page
parameter when retrieving the first page. To retrieve pages after the first page, setpage
to the value ofnext_page
found in the previous page of data retrieved.- instances
string
(optional) Default: trueSet to
true
to include all instances of recurring events or tofalse
to include only the master events of recurring series. Alternatively, set this to a specific series’ master calendar event ID to retrieve all instances in that series.Supported for
google_calendar
andoutlook_calendar
. Other services will not be affected by this parameter.In
google_calendar
, exceptions to the recurring series are still included even ifinstances
is set tofalse
or to a specific series’ master event ID. For example, an individual instance with a different description would still be included in the returned list of events.In
outlook_calendar
, exceptions are not included ifinstances
is set tofalse
. Only the series master event is returned. We recommend including astart
andend
range if settinginstances
totrue
or to a specific event ID to return a limited range of instances for infinitely recurring series.outlook calendar
can return at most a five-year period wheninstances
is set totrue
or to a specific event ID. The default values ofstart
andend
are adjusted accordingly:-
unspecified
start
andend
: return events for the past 2 years and next 3 years. -
only
start
is set: return events 5 years fromstart
. -
only
end
is set: return events 5 years beforeend
.
-
- q
string
(optional)Accepts a string to search calendar events for.
Supported for:
-
google_calendar
: Free-form search of the calendar event metadata. Not supported wheninstances
is a specific master event ID. -
outlook_calendar
: Searches thename
only, due to Graph API limitations. The newer MS Search API may be accessed through the pass-through endpoint for free-form searches instead, with the entity typemicrosoft.graph.event
.
-
- Response
200
Toggle Headers
Content-Type: application/json
Body
{ "total": 1, "count": 1, "page": 1, "next_page": null, "objects": [ { "api": "calendar", "type": "event", "id": "fdTJpb29oamJyZ2NmNWVpcXBwZTQ5NW1hcG8=", "account_id": "123", "ical_uid": "9c87c888-3b6b-6647-8b81-4baec6533b09", "calendar_id": "fa2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=", "recurrence_type": "solo", "creator": { "id": null, "name": "kloudless inc", "email": "kloudless@gmail.com" }, "organizer": { "id": null, "name": "kloudless inc", "email": "kloudless@gmail.com" }, "attendees": [], "created": "2019-05-09T07:03:51Z", "modified": "2019-05-09T07:03:51Z", "all_day": false, "start": "2019-09-01T01:00:00-08:00", "start_time_zone": "America/Los_Angeles", "end": "2019-09-01T02:00:00-08:00", "end_time_zone": "America/Los_Angeles", "name": "Test Event", "description": "testing event", "location": "PIER 39, Beach Street & The Embarcadero, San Francisco, CA 94133, USA", "status": "confirmed", "visibility": null, "attachments": [ { "url": "https://drive.google.com/file/d/0B4IICHrATMnUeF9YWlhRZ0N1ZG8/view?usp=drive_web", "id": "0B4IICHrATMnUeF9YWlhRZ0N1ZG8", "mime_type": "image/jpeg", "name": "kloudless-logo.png" } ], "custom_properties": [ { "key": "color", "value": "green", "private": true } ], "use_default_reminder": false, "reminders": [], "reminder": null, "href": "https://api.kloudless.com/v1/accounts/123/cal/calendars/fa2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=/events/fdTJpb29oamJyZ2NmNWVpcXBwZTQ5NW1hcG8=" } ], "type": "object_list", "api": "calendar" }
Create an Event
To create an event, perform a POST request containing a JSON object with the following parameters:
-
name
: Name of the event (required) -
description
: Description of the event -
start
: ISO 8601 timestamp indicating when the event starts (required) -
start_time_zone
: Thestart
time’s time zone -
end
: ISO 8601 timestamp indicating when the event ends (required) -
end_time_zone
: Theend
time’s time zone -
all_day
: A boolean value indicates whether it’s all-day event -
organizer
: A Person object describing the organizer (only supported foroutlook_calendar
,exchange
, andcaldav
) -
attendees
: A list of Person objects describing each attendeename
: Name of the attendee (required)email
: Email address of the attendee (required)
-
location
: Geographic location of the event -
use_default_reminder
: Indicates whether to use the default reminder (only supported forgoogle_calendar
; ignored otherwise) -
reminders
: A list of Reminder objects about the event’s reminders for the user account -
recurrence
: A list of Recurrence objects that contain information about a recurring event -
custom_properties
: A list of custom property objects -
online_meeting
: An Online Meeting object -
visibility
: Visibility of the event -
transparent
: A boolean value of transparency of the event -
raw
: A JSON object containing raw attribute names and values. Useraw
to specify values for upstream service attributes that are not unified by the Kloudless API, i.e., attributes not already listed here.
Here is an example request:
curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
'https://api.kloudless.com/v1/accounts/me/cal/calendars/primary/events' \
-XPOST -d '{
"name": "Event",
"start": "2016-10-01T12:30:00Z",
"end": "2016-10-01T13:30:00Z",
"raw": {
"object": {
"importance": "low"
}
}
}'
How to create a recurring event
You can use an RRULE within the Recurrence object documented above to create a recurring event. Check out the full RFC 5545 for information on RRULE property data types here.
Here is an example:
curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
'https://api.kloudless.com/v1/accounts/me/cal/calendars/primary/events' \
-d '{
"name": "Every day for ten days",
"start": "2019-04-10T10:00:00Z",
"end": "2019-04-10T11:00:00Z",
"recurrence": [{"rrule": "RRULE:FREQ=DAILY;COUNT=10"}]
}'
How to create an event with conference call details
Both outlook_calendar
and google_calendar
support adding conference
details while creating an event by just specifying a valid
online_meeting_provider
in the Online Meeting object. The upstream service
will then generate the video meeting’s details and Entry Point information.
Here is an example request using the google_calendar
service:
curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
'https://api.kloudless.com/v1/accounts/me/cal/calendars/primary/events' \
-d '{
"name": "Engineering team meeting",
"start": "2021-04-10T10:00:00Z",
"end": "2021-04-10T11:00:00Z",
"online_meeting": {
"online_meeting_provider": "hangoutsMeet"
}
}'
google_calendar
additionally supports providing custom Entry Points. When
doing so, be sure to include the appropriate scheme, such as http://
,
https://
, tel:
, or sip:
. Here is an example request:
curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
'https://api.kloudless.com/v1/accounts/me/cal/calendars/primary/events' \
-d '{
"name": "Engineering team meeting",
"start": "2021-04-10T10:00:00Z",
"end": "2021-04-10T11:00:00Z",
"online_meeting": {
"online_meeting_provider": "addOn",
"entry_points": [
{
"uri": "https://example.com/meeting-ABC-123",
"entry_point_type": "video",
"password": "fake_password"
},
{
"uri": "tel:+12345678900;1234",
"entry_point_type": "phone"
},
{
"uri": "sip:12345678@myprovider.com",
"entry_point_type": "sip"
}
]
}
}'
- RequestToggle
Headers
Authorization: Bearer [TOKEN]
Content-Type: application/jsonBody
{ "name": "Test Event", "start": "2019-09-01T01:00:00-08:00", "start_time_zone": "America/Los_Angeles", "end": "2019-09-01T02:00:00-08:00", "end_time_zone": "America/Los_Angeles", "custom_properties": [ { "key": "color", "value": "green" } ] }
- Response
201
Toggle Headers
Content-Type: application/json
Body
{ "api": "calendar", "type": "event", "id": "fdTJpb29oamJyZ2NmNWVpcXBwZTQ5NW1hcG8=", "account_id": "123", "ical_uid": "9c87c888-3b6b-6647-8b81-4baec6533b09", "calendar_id": "fa2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=", "recurrence_type": "solo", "creator": { "id": null, "name": "kloudless inc", "email": "kloudless@gmail.com" }, "organizer": { "id": null, "name": "kloudless inc", "email": "kloudless@gmail.com" }, "attendees": [], "created": "2019-05-09T07:03:51Z", "modified": "2019-05-09T07:03:51Z", "all_day": false, "start": "2019-09-01T01:00:00-08:00", "start_time_zone": "America/Los_Angeles", "end": "2019-09-01T02:00:00-08:00", "end_time_zone": "America/Los_Angeles", "name": "Test Event", "description": "testing event", "location": "PIER 39, Beach Street & The Embarcadero, San Francisco, CA 94133, USA", "status": "confirmed", "visibility": null, "attachments": [ { "url": "https://drive.google.com/file/d/0B4IICHrATMnUeF9YWlhRZ0N1ZG8/view?usp=drive_web", "id": "0B4IICHrATMnUeF9YWlhRZ0N1ZG8", "mime_type": "image/jpeg", "name": "kloudless-logo.png" } ], "custom_properties": [ { "key": "color", "value": "green", "private": true } ], "use_default_reminder": false, "reminders": [], "reminder": null, "href": "https://api.kloudless.com/v1/accounts/123/cal/calendars/fa2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=/events/fdTJpb29oamJyZ2NmNWVpcXBwZTQ5NW1hcG8=" }
Retrieve an Event
Retrieve a Calendar Event. View the data format above for specifics on the information returned.
- Response
200
Toggle Headers
Content-Type: application/json
Body
{ "api": "calendar", "type": "event", "id": "fdTJpb29oamJyZ2NmNWVpcXBwZTQ5NW1hcG8=", "account_id": "123", "ical_uid": "9c87c888-3b6b-6647-8b81-4baec6533b09", "calendar_id": "fa2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=", "recurrence_type": "solo", "creator": { "id": null, "name": "kloudless inc", "email": "kloudless@gmail.com" }, "organizer": { "id": null, "name": "kloudless inc", "email": "kloudless@gmail.com" }, "attendees": [], "created": "2019-05-09T07:03:51Z", "modified": "2019-05-09T07:03:51Z", "all_day": false, "start": "2019-09-01T01:00:00-08:00", "start_time_zone": "America/Los_Angeles", "end": "2019-09-01T02:00:00-08:00", "end_time_zone": "America/Los_Angeles", "name": "Test Event", "description": "testing event", "location": "PIER 39, Beach Street & The Embarcadero, San Francisco, CA 94133, USA", "status": "confirmed", "visibility": null, "attachments": [ { "url": "https://drive.google.com/file/d/0B4IICHrATMnUeF9YWlhRZ0N1ZG8/view?usp=drive_web", "id": "0B4IICHrATMnUeF9YWlhRZ0N1ZG8", "mime_type": "image/jpeg", "name": "kloudless-logo.png" } ], "custom_properties": [ { "key": "color", "value": "green", "private": true } ], "use_default_reminder": false, "reminders": [], "reminder": null, "href": "https://api.kloudless.com/v1/accounts/123/cal/calendars/fa2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=/events/fdTJpb29oamJyZ2NmNWVpcXBwZTQ5NW1hcG8=" }
Update an Event
To update an event, create a JSON object with any of the following properties:
-
name
-
description
-
start
-
start_time_zone
-
end
-
end_time_zone
-
all_day
-
organizer
google_calendar
- When updating the organizer the event will be moved to the organizer’s
calendar. Thus changing the
calendar_id
, which will be returned in the response.
- When updating the organizer the event will be moved to the organizer’s
calendar. Thus changing the
outlook
- Updating the organizer is not supported
-
attendees
-
location
-
use_default_reminder (only supported for
google_calendar
) -
reminders
-
recurrence
-
visibility
-
transparent
-
custom_properties
-
raw
The new object will be returned on success.
Limitations:
- Please note that updating a single instance of a recurring event for
caldav
oricloud_calendar
is currently not supported.
Example request:
curl -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-XPATCH -d '{
"end": "2016-11-01T15:30:00Z",
"description": "A new description"
}' \
'https://api.kloudless.com/v1/accounts/me/cal/calendars/primary/events/fdTwefoewOEewOIWfgnrgG8='
How to RSVP to a calendar event invitation
Example:
curl -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-XPATCH -d '{
"attendees": [{
"name": "attendee",
"email": "attendee@company.com",
"status": "accepted"
}]
}' \
'https://api.kloudless.com/v1/accounts/me/cal/calendars/primary/events/fdTwefoewOEewOIWfgnrgG8='
How to modify custom properties
Assume we already have the following custom property in an event:
"custom_properties": [
{
"key": "color",
"value": "green"
}
]
To create a new custom property:
curl -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-XPATCH -d '{
"custom_properties": [
{
"key": "opacity",
"value": "0.5"
}
]
}' \
'https://api.kloudless.com/v1/accounts/me/cal/calendars/primary/events/fdTwefoewOEewOIWfgnrgG8='
To update an existing custom property:
curl -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-XPATCH -d '{
"custom_properties": [
{
"key": "color",
"value": "red"
}
]
}' \
'https://api.kloudless.com/v1/accounts/me/cal/calendars/primary/events/fdTwefoewOEewOIWfgnrgG8='
To delete an existing custom property:
curl -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-XPATCH -d '{
"custom_properties": [
{
"key": "color",
"value": null
}
]
}' \
'https://api.kloudless.com/v1/accounts/me/cal/calendars/primary/events/fdTwefoewOEewOIWfgnrgG8='
Note that Google Calendar always requires the private
field set to true
or
false
as documented above.
How to update a meeting to include conference call details.
Both outlook_calendar
and google_calendar
support adding conference details
to an existing calendar event by just specifying a valid
online_meeting_provider
in the Online Meeting object. The upstream service
will then generate the video meeting’s details and Entry Point information.
However, no service supports updates to an existing Online Meeting object’s conference details after the Online Meeting information has been set on the calendar event.
Here is an example request using the google_calendar
service:
curl -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-XPATCH -d '{
"online_meeting": {
"online_meeting_provider": "hangoutsMeet"
}
}' \
'https://api.kloudless.com/v1/accounts/me/cal/calendars/primary/events/fdTwefoewOEewOIWfgnrgG8='
- RequestToggle
Headers
Authorization: Bearer [TOKEN]
Content-Type: application/jsonBody
{ "end": "2019-09-01T02:00:00-08:00", "description": "testing event" }
- Response
200
Toggle Headers
Content-Type: application/json
Body
{ "api": "calendar", "type": "event", "id": "fdTJpb29oamJyZ2NmNWVpcXBwZTQ5NW1hcG8=", "account_id": "123", "ical_uid": "9c87c888-3b6b-6647-8b81-4baec6533b09", "calendar_id": "fa2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=", "recurrence_type": "solo", "creator": { "id": null, "name": "kloudless inc", "email": "kloudless@gmail.com" }, "organizer": { "id": null, "name": "kloudless inc", "email": "kloudless@gmail.com" }, "attendees": [], "created": "2019-05-09T07:03:51Z", "modified": "2019-05-09T07:03:51Z", "all_day": false, "start": "2019-09-01T01:00:00-08:00", "start_time_zone": "America/Los_Angeles", "end": "2019-09-01T02:00:00-08:00", "end_time_zone": "America/Los_Angeles", "name": "Test Event", "description": "testing event", "location": "PIER 39, Beach Street & The Embarcadero, San Francisco, CA 94133, USA", "status": "confirmed", "visibility": null, "attachments": [ { "url": "https://drive.google.com/file/d/0B4IICHrATMnUeF9YWlhRZ0N1ZG8/view?usp=drive_web", "id": "0B4IICHrATMnUeF9YWlhRZ0N1ZG8", "mime_type": "image/jpeg", "name": "kloudless-logo.png" } ], "custom_properties": [ { "key": "color", "value": "green", "private": true } ], "use_default_reminder": false, "reminders": [], "reminder": null, "href": "https://api.kloudless.com/v1/accounts/123/cal/calendars/fa2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=/events/fdTJpb29oamJyZ2NmNWVpcXBwZTQ5NW1hcG8=" }
Delete an Event
Example request:
curl -L -H 'Authorization: Bearer [TOKEN]' \
-XDELETE https://api.kloudless.com/v1/accounts/me/cal/calendars/primary/events/fdTwefoewOEewOIWfgnrgG8=
- Response
204
Contacts
Currently supported for:
-
google_calendar
-
outlook_calendar
-
exchange
A Contact object represents metadata about a user’s online contact. A contact has the following attributes:
-
id
Unique identifier for this contact. -
name
A contact’s name. (read-only) -
name_details
A JSON object with the following attributes:given
: Given namefamily
: Family namefull
: Full name (read-only)
-
birthday
ISO 8601 date indicating the contact’s birthday -
organizations
A list of Organization objects describing the contact’s organization. An Organization object has the following attributes:type
: One ofwork
,school
, orother
.name
: The name of the organization. (required)department
: The contact’s department at the organization.title
: The contact’s job title at the organization.location
: The location of the organization where the contact works at.
-
created
ISO 8601 timestamp indicating when the contact was created -
emails
A list of Email objects describing the contact’s email addresses. An Email object has the following attributes:type
: One ofhome
,work
, orother
.value
: The email address. (required)primary
: A boolean indicating whether the email is the primary address. (read-only)
-
gender
The contact’s gender, one ofmale
,female
,other
, orunknown
. -
initials
The contact’s initials. -
modified
ISO 8601 timestamp indicating when the contact was last modified. -
phones
A list of Phone objects describing the contact’s phone numbers. A Phone object has the following attributes:type
: One ofhome
,work
,mobile
, orother
.value
: The phone number. (required)primary
: A boolean indicating whether the phone is primary number. (read-only)
-
relationships
A list of Relation objects describing the contact’s relationship with another contact. A Relation object has the following attributes:name
: The name of the other contact this relation refers to. (required)type
: One ofchild
,spouse
, orother
.
-
addresses
A list of Address objects describing the contact’s address. An Address object has the following attributes:type
: One ofhome
,work
, orother
.street
: The street address.city
: The city of the address.state
: The state of the address.country
: The country of the address.postal_code
: The postal code of the address.
-
websites
A list of websites associated with the contact. -
raw
Underlying object retrieved from the upstream service. -
type
Will always becontact
. -
api
Will always becontact
. -
href
The absolute URL to get the object’s metadata.
List Contacts
The response contains the following information:
-
count
Number of objects on this page -
page
Page identifier -
next_page
The value to provide in the request’spage
query parameter for the next page. This will benull
if there are no more pages. -
objects
List of contact objects
Note: exchange
only supports Exchange 2019
- Parameters
- page_size
number
(optional) Default: 100Number of objects in each page. The
page_size
is treated as advisory and may not be strictly adhered to, depending on the upstream service’s capabilities. Thepage_size
must be between1
and1000
.- page
string
(optional)Page to return. If
page
is not specified, the first page is returned, containingpage_size
objects. To retrieve pages after the first page, setpage
to the value ofnext_page
returned in the previous response.
- Response
200
Toggle Headers
Content-Type: application/json
Body
{ "count": 1, "next_page": null, "api": "contact", "objects": [ { "id": "FytHKX4ltWzfKRJsvh5Ii9Uh7fPBkkXBKjIjOU-sx7CY=", "name": "Walter Bishop", "name_details": { "given": "Walter", "full": "Walter Bishop", "family": "Bishop" }, "birthday": "1946-08-20", "organizations": [ { "type": null, "name": "Kloudless", "department": null, "title": "Research Scientist", "location": null } ], "emails": [ { "type": "work", "value": "hello@kloudless.com", "primary": true } ], "gender": null, "initials": null, "modified": "2019-05-07T08:55:17Z", "phones": [], "relationships": [ { "name": "Peter Bishop", "type": "child" } ], "addresses": [ { "type": "home", "street": "2054 University Ave #200", "city": "Berkeley", "state": "CA", "country": "US", "postal_code": "94704" }, { "type": "work", "street": "14F, No.460 Sec.4, Xinyi Rd.", "city": "Xinyi District", "state": "Taipei City", "country": "TW", "postal_code": "110" } ], "websites": [ "https://github.com/Kloudless", "https://kloudless.com" ], "type": "contact", "api": "contact", "href": "https://api.kloudless.com/v1/accounts/123/contact/contacts/FytHKX4ltWzfKRJsvh5Ii9Uh7fPBkkXBKjIjOU-sx7CY=" } ], "type": "object_list", "page": 1 }
Create a Contact
Supported services:
-
google_calendar
-
outlook_calendar
Please note that this endpoint requires customized scopes configured, including full contact writing permissions.
To create a contact, perform a POST request containing a JSON object with the following parameters:
-
name_details
: A JSON object with details about the contact’s name (required) . -
birthday
: ISO 8601 date indicating the contact’s birthday. -
organizations
: A list of Organization objects describing the contact’s organization. -
emails
: A list of Email objects describing the contact’s email addresses. -
gender
: The contact’s gender, one ofmale
,female
,other
, orunknown
. -
initials
: The contact’s initials. -
phones
: A list of Phone objects describing the contact’s phone numbers. -
relationships
: A list of Relation objects describing the contact’s relationship with another contact. -
addresses
: A list of Address objects describing the contact’s address. -
websites
: A list of websites associated with the contact. -
raw
: A JSON object containing raw attribute names and values. Useraw
to specify values for upstream service attributes that are not unified by the Kloudless API, i.e., attributes not already listed here.
Here is an example request:
curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
'https://api.kloudless.com/v1/accounts/me/contact/contacts' \
-XPOST -d '{
"name_details": {
"given": "Walter",
"family": "Bishop"
},
"birthday": "1946-08-20",
"organizations": [
{
"name": "Kloudless",
"title": "Research Scientist"
}
],
"emails": [
{
"type": "work",
"value": "hello@kloudless.com"
}
],
"relationships": [
{
"name": "Peter Bishop",
"type": "child"
}
],
"addresses": [
{
"type": "home",
"street": "2054 University Ave #200",
"city": "Berkeley",
"state": "CA",
"country": "US",
"postal_code": "94704"
},
{
"type": "work",
"street": "14F, No.460 Sec.4, Xinyi Rd.",
"city": "Xinyi District",
"state": "Taipei City",
"country": "TW",
"postal_code": "110"
}
],
"websites": [
"https://github.com/Kloudless",
"https://kloudless.com"
]
}'
- Response
201
Toggle Headers
Content-Type: application/json
Body
{ "id": "FytHKX4ltWzfKRJsvh5Ii9Uh7fPBkkXBKjIjOU-sx7CY=", "name": "Walter Bishop", "name_details": { "given": "Walter", "full": "Walter Bishop", "family": "Bishop" }, "birthday": "1946-08-20", "organizations": [ { "type": null, "name": "Kloudless", "department": null, "title": "Research Scientist", "location": null } ], "emails": [ { "type": "work", "value": "hello@kloudless.com", "primary": true } ], "gender": null, "initials": null, "modified": "2019-05-07T08:55:17Z", "phones": [], "relationships": [ { "name": "Peter Bishop", "type": "child" } ], "addresses": [ { "type": "home", "street": "2054 University Ave #200", "city": "Berkeley", "state": "CA", "country": "US", "postal_code": "94704" }, { "type": "work", "street": "14F, No.460 Sec.4, Xinyi Rd.", "city": "Xinyi District", "state": "Taipei City", "country": "TW", "postal_code": "110" } ], "websites": [ "https://github.com/Kloudless", "https://kloudless.com" ], "type": "contact", "api": "contact", "href": "https://api.kloudless.com/v1/accounts/123/contact/contacts/FytHKX4ltWzfKRJsvh5Ii9Uh7fPBkkXBKjIjOU-sx7CY=" }
Retrieve a Contact
Note: exchange
only supports Exchange 2019
- Response
200
Toggle Headers
Content-Type: application/json
Body
{ "id": "FytHKX4ltWzfKRJsvh5Ii9Uh7fPBkkXBKjIjOU-sx7CY=", "name": "Walter Bishop", "name_details": { "given": "Walter", "full": "Walter Bishop", "family": "Bishop" }, "birthday": "1946-08-20", "organizations": [ { "type": null, "name": "Kloudless", "department": null, "title": "Research Scientist", "location": null } ], "emails": [ { "type": "work", "value": "hello@kloudless.com", "primary": true } ], "gender": null, "initials": null, "modified": "2019-05-07T08:55:17Z", "phones": [], "relationships": [ { "name": "Peter Bishop", "type": "child" } ], "addresses": [ { "type": "home", "street": "2054 University Ave #200", "city": "Berkeley", "state": "CA", "country": "US", "postal_code": "94704" }, { "type": "work", "street": "14F, No.460 Sec.4, Xinyi Rd.", "city": "Xinyi District", "state": "Taipei City", "country": "TW", "postal_code": "110" } ], "websites": [ "https://github.com/Kloudless", "https://kloudless.com" ], "type": "contact", "api": "contact", "href": "https://api.kloudless.com/v1/accounts/123/contact/contacts/FytHKX4ltWzfKRJsvh5Ii9Uh7fPBkkXBKjIjOU-sx7CY=" }
Update a Contact
Supported services:
-
google_calendar
-
outlook_calendar
Please note that this endpoint requires customized scopes configured, including full contact writing permissions.
To update a contact, perform a PATCH request containing a JSON object with one or more of the following parameters:
-
name_details
: A JSON object with details about the contact’s name. -
birthday
: ISO 8601 date indicating the contact’s birthday. -
organizations
: A list of Organization objects describing the contact’s organization. -
emails
: A list of Email objects describing the contact’s email addresses. -
gender
: The contact’s gender, one ofmale
,female
,other
, orunknown
. -
initials
: The contact’s initials. -
phones
: A list of Phone objects describing the contact’s phone numbers. -
relationships
: A list of Relation objects describing the contact’s relationship with another contact. -
addresses
: A list of Address objects describing the contact’s address. -
websites
: A list of websites associated with the contact. -
raw
: A JSON object containing raw attribute names and values. Useraw
to specify values for upstream service attributes that are not unified by the Kloudless API, i.e., attributes not already listed here.
Here is an example request:
curl -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-XPATCH -d '{
"birthday": "1946-08-20",
"organizations": [
{
"name": "Kloudless",
"title": "Research Scientist"
}
],
"emails": [
{
"type": "work",
"value": "hello@kloudless.com"
}
]
}' \
'https://api.kloudless.com/v1/accounts/me/contact/contacts/FytHKX4ltWzfKRJsvh5Ii9Uh7fPBkkXBKjIjOU-sx7CY'
- Response
200
Toggle Headers
Content-Type: application/json
Body
{ "id": "FytHKX4ltWzfKRJsvh5Ii9Uh7fPBkkXBKjIjOU-sx7CY=", "name": "Walter Bishop", "name_details": { "given": "Walter", "full": "Walter Bishop", "family": "Bishop" }, "birthday": "1946-08-20", "organizations": [ { "type": null, "name": "Kloudless", "department": null, "title": "Research Scientist", "location": null } ], "emails": [ { "type": "work", "value": "hello@kloudless.com", "primary": true } ], "gender": null, "initials": null, "modified": "2019-05-07T08:55:17Z", "phones": [], "relationships": [ { "name": "Peter Bishop", "type": "child" } ], "addresses": [ { "type": "home", "street": "2054 University Ave #200", "city": "Berkeley", "state": "CA", "country": "US", "postal_code": "94704" }, { "type": "work", "street": "14F, No.460 Sec.4, Xinyi Rd.", "city": "Xinyi District", "state": "Taipei City", "country": "TW", "postal_code": "110" } ], "websites": [ "https://github.com/Kloudless", "https://kloudless.com" ], "type": "contact", "api": "contact", "href": "https://api.kloudless.com/v1/accounts/123/contact/contacts/FytHKX4ltWzfKRJsvh5Ii9Uh7fPBkkXBKjIjOU-sx7CY=" }
Delete a Contact
Supported services:
-
google_calendar
-
outlook_calendar
Please note that this endpoint requires customized scopes configured, including full contact writing permissions.
Example request:
curl -L -H 'Authorization: Bearer [TOKEN]' \
-XDELETE https://api.kloudless.com/v1/accounts/me/contact/contacts/FytHKX4ltWzfKRJsvh5Ii9Uh7fPBkkXBKjIjOU-sx7CY
- Response
204
Accessing Co-worker Calendars
Users using Google Workspace (formerly G Suite), Office 365, and Exchange Server commonly need to schedule events with other users in their tenant. This requires checking those users’ availability on their respective primary calendars.
To help with this, Kloudless provides mechanisms to both obtain org-wide access to data in a tenant via an admin account as well as simply check other calendars in an organization via any regular user’s account.
The following steps demonstrate how to retrieve other users’ calendars:
-
List all users via the Team API’s Users endpoint, or retrieve a specific known user’s metadata.
-
Each user’s metadata includes a
calendar_id
attribute. If the authenticated user has access to the calendar, its events can be retrieved as usual via the List endpoint.
The Kloudless admin OAuth flow usually grants access to the Team API as documented in the Team API docs, but Kloudless makes an exception listing and retrieving user metadata since calendar services like Google Calendar make this information accessible to regular users.
Outlook calendar does require that the user be authenticated as an admin prior to viewing others’ calendars, however. This then enables access to list all users via the Team API. If this isn’t feasible, users can still always list calendars that they’ve subscribed to, or invite users to events by their email address without specifically checking their availability.
Calendar availability
Kloudless returns available time slots given a set of calendars, meeting duration time, and preferred meeting times.
Currently supported for:
-
google_calendar
-
outlook_calendar
-
caldav
-
icloud_calendar
-
exchange
Check out our UI Tool to schedule a time between your app’s users here: https://github.com/Kloudless/meeting-scheduler
Find Availability
To find time ranges that work for an event among multiple participants, provide the following parameters:
-
calendars
: (Optional) An object with data as described below. If not provided, uses theprimary
calendar instead.- For calendars in the same account, provide a list of Calendar IDs.
- For calendars in other accounts, provide a JSON object with the Account ID as key, and list of Calendar IDs as value.
-
meeting_duration
: (Required) ISO 8601 format for duration. See Wikipedia for more information on the format and examples. -
time_windows
: (Required) List of desired time slots, each of which is an object with the following attributes:start
: ISO 8601 datetime timestamp indicating the beginning of a range of availability.end
: ISO 8601 datetime timestamp indicating the end of a range of availability.
-
time_slot_increment
: (Optional) This option is required if you’d like actual time slots returned rather than only ranges of availability.time_slot_increment
accepts the number of minutes between consecutive time slots. For example, set it to15
if you’d like the time slots returned to represent10:00–11:00
,10:15–11:15
,10:30–11:30
, and so on, assuming a one hour meeting duration. If not provided or set to0
(the default), the response contains the available time range without being sliced into bookable time slots. For example, a time range of10:00–14:00
regardless of the meeting duration.
A list of ranges will be returned with start
and end
times. Each time range
returned indicates that all calendars are available for a meeting for the
meeting_duration
specified within that range. It is then up to your application
to determine the exact start time for the event and to create the event using the
Event Creation endpoint.
You can use time_slot_increment
above if you’d like to avoid slicing the
availability range into time slots and have our servers do that for you instead.
Otherwise, the windows returned represent ranges in time and not specific time
slots for potential events, so will almost always be larger than the duration
specified.
Example request:
curl -H 'Authorization: Bearer [TOKEN]' \
-H 'Content-Type: application/json' \
-XPOST -d '{
"calendars": ["fa2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20="],
"meeting_duration": "PT1H",
"time_windows": [{
"start": "2017-05-20T08:00:00+07:00",
"end": "2017-05-20T12:00:00+07:00"
},{
"start": "2017-05-21T08:00:00+07:00",
"end": "2017-05-21T12:00:00+07:00"
}]
}' \
'https://api.kloudless.com/v1/accounts/123/cal/availability'
Calendars under multiple accounts can be searched by separating the account IDs with commas in the URL and separating their respective Bearer Tokens in the Authorization header with commas as well:
curl -H 'Authorization: Bearer [TOKEN1],[TOKEN2]' \
-H 'Content-Type: application/json' \
-XPOST -d '{
"calendars": {
"123": ["fa2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20="],
"456": ["fQUFNa0FEUTBOR1kxT0daa0xUTTBNamd0TkRKaE5pMDVNMk5sTFRRME9EWTFOV0V3TldJMU53QkdBQUFBQUFBRUFnQ0t6bGYxUnE2MXpvVmsxZ2FlQndCMlYzWDNBOUtqVExZWllrWWFBYy1BQUFBQUFBRUdBQUIyVjNYM0E5S2pUTFlaWWtZYUFjLUFBQUFBQUJ6TEFBQT0="],
},
"meeting_duration": "PT1H",
"time_windows": [{
"start": "2017-05-20T08:00:00+07:00",
"end": "2017-05-20T12:00:00+07:00"
},{
"start": "2017-05-21T08:00:00+07:00",
"end": "2017-05-21T12:00:00+07:00"
}]
}' \
'https://api.kloudless.com/v1/accounts/123,456/cal/availability'
An example response can be found in the dropdown below.
- RequestToggle
Headers
Authorization: Bearer [TOKEN]
Content-Type: application/jsonBody
{ "calendars": [ "fa2xvdWRsZXNzLnRlc3QudGltb3RoeUBnbWFpbC5jb20=" ], "meeting_duration": "PT1H", "time_windows": [ { "start": "2017-05-20T08:00:00+07:00", "end": "2017-05-20T12:00:00+07:00" }, { "start": "2017-05-21T08:00:00+07:00", "end": "2017-05-21T12:00:00+07:00" } ] }
- Response
200
Toggle Headers
Content-Type: application/json
Body
{ "time_windows": [ { "start": "2017-05-20T09:00:00+07:00", "end": "2017-05-20T11:15:00+07:00" }, { "start": "2017-05-21T09:30:00+07:00", "end": "2017-05-21T11:25:00+07:00" } ], "type": "availability", "api": "calendar" }
Activity Monitoring
Activity within a calendar service ranges from creating events and adding attendees to changing start/end times, and more. We track the activity data provided by the third-party service. We currently provide the following types of activity as Kloudless Activity objects via the Kloudless Activity API:
-
add
: a new object has been created -
delete
: an object has been deleted -
update
: an object has been modified
Details and metadata about each activity occurring in a connected account is provided in the Kloudless Activity object.
See the Activity Monitoring API endpoints for more information on supported services, API endpoints, and the format of activity data.
Activity API required: These endpoints require your Kloudless subscription to include access to the Activity API.
List Activity
The response contains the following fields:
-
objects
: List of the activity that has taken place. If no activity is available, then there are no objects left to paginate through using thecursor
at this time. -
cursor
: A string identifying a location in the stream immediately after the activity described inobjects
. -
count
: Number of activity objects returned. -
total
: An optional field only present when Kloudless temporarily stores activity data for retrieval by an application. Represents the total number of activity objects currently stored for this account. Not present for connectors that directly query the upstream API for activity information. See Activity Retention for more information. -
type
: Will always beobject_list
. -
api
: Will always beactivity
.
The returned cursor should be used in subsequent requests so that only activity that has not been seen previously is returned.
Use the default
alias to access the default Subscription’s activity as shown
in this example request:
curl -H 'Authorization: Bearer [TOKEN]' \
'https://api.kloudless.com/v1/accounts/me/subscriptions/default/activity?cursor=121'
Check out the full Activity Monitoring API docs for more information on the API response format.
- Parameters
- cursor
string
(optional)The last cursor in the activity stream that your application has seen. The cursor can also be set to
after-auth
, which will retrieve activity that occurred after the account was connected.
- Response
200
Toggle Headers
Content-Type: application/json
Body
{ "count": 1, "api": "activity", "cursor": "121", "objects": [{ "id": "30", "account": 123, "action": "+", "ip": null, "modified": "2018-10-18T08:53:28Z", "type": "add", "user_id": null, "metadata": { "api": "calendar", "type": "event", "recurrence_type": "solo", "calendar_id": "fa2xvdWRsZXNzQGdtYWlsLmNvbQ==", "account_id": "123", "id": "fM3NndHRhbWRzamRnOXJvaDU2ZWI4bWoyOTA=", "name": "Test Event", "description": null, "location": null, "use_default_reminder": false, "reminders": [], "visibility": null, "created": "2018-10-18T08:53:28Z", "modified": "2018-10-18T08:53:28.106000Z", "start": "2018-10-19T09:00:00Z", "end": "2018-10-19T10:00:00Z", "status": "confirmed", "attendees": [], "attachments": [], "organizer": { "id": null, "name": null, "email": "kloudless@gmail.com", "required": true, "resource": false }, "creator": { "id": null, "name": null, "email": "kloudless@gmail.com", "required": true, "resource": false } } }], "type": "object_list", }
Resources
A Resource represents a shared resource that users can reserve, such as a meeting room, car, equipment, or any other item or space users might need to schedule a time to use.
Currently supported for:
-
google_calendar
-
outlook_calendar
-
exchange
A Resource has the following attributes:
-
id
Unique identifier for the resource. -
name
Name of the resource. -
description
Additional details about the resource. -
email
The resource’s email address. Use this when booking calendar events to reserve the resource for the duration of the event. -
calendar
The resource’s calendar ID. Use this to check its availability or retrieve its schedule. -
category
The type of resource. Can be either:room
: Represents a meeting room.other
: Represents a resource other than a meeting room.
-
raw
Underlying object retrieved from the service. -
type
Will always beresource
. -
api
Will always becalendar
.
Not all services provide information for all Resource attributes. For example, Google Workspace (formerly G Suite) provides data for all the listed attributes, whereas Office 365 only provides the Resource’s (meeting room’s) email address.
List Resources
Service-specific notes:
-
Google Workspace (formerly G Suite) requires admin access to org-wide data to list calendar resources via the Admin SDK.
-
Outlook allows any user to list all meeting rooms.
-
Exchange requires room list set up. Any user can list all meeting rooms.
The response contains the following information:
-
count
Integer. Number of objects on this page. -
page
String. Page identifier. -
next_page
The value to provide in the request’spage
query parameter for the next page. This will benull
if there are no more pages. -
objects
Array. List of objects.
- Parameters
- page_size
number
(optional) Default: 100Number of objects in each page. The
page_size
is treated as advisory and may not be strictly adhered to, depending on the upstream service’s capabilities. Thepage_size
must be between1
and1000
.- page
string
(optional)Page to return. If
page
is not specified, the first page is returned, containingpage_size
objects. To retrieve pages after the first page, setpage
to the value ofnext_page
returned in the previous response.
- Response
200
Toggle Headers
Content-Type: application/json
Body
{ "count": 1, "next_page": null, "objects": [ { "id": "ZGV2ZWxvcGVycy5rbG91ZGxlc3MuY29tXzJkMzYzODMyMzUzODMyMzEzMDMxMzczM0ByZXNvdXJjZS5jYWxlbmRhci5nb29nbGUuY29t", "name": "room 1", "description": "conference room 1", "email": "developers.kloudless.com_2d3638323538323130313733@resource.calendar.google.com", "calendar": "ZGV2ZWxvcGVycy5rbG91ZGxlc3MuY29tXzJkMzYzODMyMzUzODMyMzEzMDMxMzczM0ByZXNvdXJjZS5jYWxlbmRhci5nb29nbGUuY29t", "category": "room", "type": "resource", "api": "calendar" } ], "page": "1", "type": "object_list", "api": "calendar" }