SDK reference
Calendar
GET/
Free/busy of other mailboxes in the organization (times and busy status only, no titles), for scheduling. Addresses outside the organization come back as unknown.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/availability?from=1&to=1' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Acts on the event a message carries: add puts a published or forwarded event in a calendar, refresh sends a guest who asked the latest version, counter accepts or declines a guest's proposed new time (the organizer only).
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/threads/{threadId}/messages/{messageId}/invitation/{action}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"calendarId": {},
"accept": true
}'GET/
The caller's own events across the mailboxes they're a member of (at most 62 days), read-only: what other apps show next to their own dates (the Tasks calendar's "My calendar"). Cancelled events and free time are left out.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/calendar/mine?from=1&to=1' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The mailbox's calendars, default first. The default calendar is created on first use.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Creates a calendar (at most 50 per mailbox).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example"
}'PATCH/
Renames a calendar or changes its color or description.
Parameters and answerscurl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example",
"color": "blue",
"description": "example"
}'DELETE/
Deletes a calendar and its events. The default calendar can't be deleted.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Occurrences between from and to (UTC milliseconds, at most 400 days apart) across the mailbox's calendars, or those in calendarId (comma-separated), with recurring events expanded in their own time zone.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/events?from=1&to=1' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Occurrences whose title or location has every word of q (case and accents ignored), from a year back to two years ahead: upcoming first (soonest first), then earlier ones (latest first), one per event series, at most 50.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/events/search?q=example' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Creates an event. Times are wall-clock times in timeZone; all-day events take dates with an exclusive end. With attendees, the mailbox is the organizer and, unless notify is false, attendees are emailed an invitation.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}/events' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"start": "example",
"end": "example",
"timeZone": "example"
}'GET/
An event with its recurrence, attendees, answers and changed occurrences.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}/events/{eventId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PUT/
Updates an event, or with recurrenceId one occurrence of it. Changing a series' time or repeat rule drops its changed occurrences and asks attendees again. Attendees get the update; removed attendees get a cancellation. moveTo moves the event to another calendar.
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}/events/{eventId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"start": "example",
"end": "example",
"timeZone": "example"
}'DELETE/
Deletes an event, or with recurrenceId one occurrence. Attendees of an event the mailbox organizes get a cancellation unless notify=false.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}/events/{eventId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Accepts, tentatively accepts or declines an invitation (or one occurrence) and, unless notify is false, emails the answer to the organizer.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}/events/{eventId}/respond' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"status": "accepted"
}'POST/
Hands this mailbox's invitation to someone else (they're invited, the organizer is told).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}/events/{eventId}/delegate' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"to": {
"email": "person@example.com"
}
}'POST/
Proposes a new time to the organizer (COUNTER); nothing changes until they answer.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}/events/{eventId}/propose' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"start": 1,
"end": 1
}'POST/
Adds the events in an iCalendar file; events whose UID is already in the calendar are replaced. Floating times are read in timeZone.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}/import' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"ics": "example"
}'GET/
The calendar as an iCalendar file.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}/export' \
-H "Authorization: Bearer $CACTIVE_TOKEN"