User API
Calendars
Calendar sync and events
GET
/calendarsList calendars
Query parameters
userIdstring
principalIdstringAct on this principal's own account (the caller must be their coordinator through an active delegation). Omit for the caller's own. A miss is 404 principal_not_found.
Responses
200Calendars
ok reqenum
truecalendars reqany[]
pageinteger
perPageinteger
totalinteger
Request
curl 'https://app.openassistant.us/api/calendars' \
-H "Authorization: Bearer ak_live_..."Response
{
"ok": true,
"calendars": [
{
"id": "string",
"platform": "google",
"name": "string",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z",
"role": "string",
"isPrimary": true,
"userIdentifier": "string",
"ownerEmail": "string"
}
]
}GET
/calendars/{calendarId}Get a calendar
Path parameters
calendarId reqstring
Responses
200Calendar
ok reqenum
truecalendar reqobject
id reqstring
platform reqenum
googleazureapplesystemname reqstring
timezonestring
etagstring | null
referenceIdstring
conferenceSolutionsany[]
backgroundColorstring | null
lastSyncedAtstring | null
lastSyncTokenstring | null
syncErrorstring | null
syncErrorCountnumber
syncErrorAtstring | null
connectedAtstring | null
eventCountnumber
createdAt reqstring
updatedAt reqstring
Request
curl 'https://app.openassistant.us/api/calendars/<calendarId>' \
-H "Authorization: Bearer ak_live_..."Response
{
"ok": true,
"calendar": {
"id": "string",
"platform": "google",
"name": "string",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z"
}
}PATCH
/calendars/{calendarId}Update the caller's (or, with principalId, a principal's) link to a calendar
Path parameters
calendarId reqstring
Query parameters
principalIdstringAct on this principal's own account (the caller must be their coordinator through an active delegation). Omit for the caller's own. A miss is 404 principal_not_found.
Request body
userCalendar reqobject
agntAsAttendeeenum
noneonly_agnt_eventsall_eventsResponses
200Updated
ok reqenum
truecalendarId reqstring
404Calendar or principal not found
status reqinteger
error_codestring
error reqstring
Request
curl 'https://app.openassistant.us/api/calendars/<calendarId>' \
-X PATCH \
-H "Authorization: Bearer ak_live_..." \
-H "Content-Type: application/json" \
-d '{
"userCalendar": {
"agntAsAttendee": "none"
}
}'Response
{
"ok": true,
"calendarId": "string"
}GET
/calendars/{calendarId}/eventsGet calendar events
Path parameters
calendarId reqstring
Query parameters
timezonestring
startsAtstring
endsAtstring
Responses
200Events
ok reqenum
trueevents reqany[]
Request
curl 'https://app.openassistant.us/api/calendars/<calendarId>/events' \
-H "Authorization: Bearer ak_live_..."Response
{
"ok": true,
"events": [
null
]
}POST
/calendars/{calendarId}/sync-eventsSync calendar events
Path parameters
calendarId reqstring
Responses
200Synced
ok reqenum
truesyncEvents reqobject
message reqstring
Request
curl 'https://app.openassistant.us/api/calendars/<calendarId>/sync-events' \
-X POST \
-H "Authorization: Bearer ak_live_..."Response
{
"ok": true,
"syncEvents": {
"message": "string"
}
}