SDK reference

Calendar

Each route's function in the SDK, its call beside the same request in cURL.
orgMailMailboxesAvailability

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/availability

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 answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/availability?from=1&to=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMailMailboxesThreadsMessagesInvitationByAction

POST/v1/orgs/:orgId/mail/mailboxes/:mailboxId/threads/:threadId/messages/:messageId/invitation/:action

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).

Parameters and answers
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
  }'
orgMailCalendarMine

GET/v1/orgs/:orgId/mail/calendar/mine

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 answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/calendar/mine?from=1&to=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMailMailboxesCalendars

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars

The mailbox's calendars, default first. The default calendar is created on first use.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMailMailboxesCalendars

POST/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars

Creates a calendar (at most 50 per mailbox).

Parameters and answers
curl -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"
  }'
patchOrgMailMailboxesCalendarsByCalendarId

PATCH/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars/:calendarId

Renames a calendar or changes its color or description.

Parameters and answers
curl -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"
  }'
deleteOrgMailMailboxesCalendarsByCalendarId

DELETE/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars/:calendarId

Deletes a calendar and its events. The default calendar can't be deleted.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgMailMailboxesEvents

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/events

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.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/events?from=1&to=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMailMailboxesCalendarsEvents

POST/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars/:calendarId/events

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.

Parameters and answers
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"
  }'
orgMailMailboxesCalendarsEventsByEventId

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars/:calendarId/events/:eventId

An event with its recurrence, attendees, answers and changed occurrences.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}/events/{eventId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putOrgMailMailboxesCalendarsEventsByEventId

PUT/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars/:calendarId/events/:eventId

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.

Parameters and answers
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"
  }'
deleteOrgMailMailboxesCalendarsEventsByEventId

DELETE/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars/:calendarId/events/:eventId

Deletes an event, or with recurrenceId one occurrence. Attendees of an event the mailbox organizes get a cancellation unless notify=false.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}/events/{eventId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgMailMailboxesCalendarsEventsRespond

POST/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars/:calendarId/events/:eventId/respond

Accepts, tentatively accepts or declines an invitation (or one occurrence) and, unless notify is false, emails the answer to the organizer.

Parameters and answers
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"
  }'
postOrgMailMailboxesCalendarsEventsDelegate

POST/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars/:calendarId/events/:eventId/delegate

Hands this mailbox's invitation to someone else (they're invited, the organizer is told).

Parameters and answers
curl -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"
    }
  }'
postOrgMailMailboxesCalendarsEventsPropose

POST/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars/:calendarId/events/:eventId/propose

Proposes a new time to the organizer (COUNTER); nothing changes until they answer.

Parameters and answers
curl -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
  }'
postOrgMailMailboxesCalendarsImport

POST/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars/:calendarId/import

Adds the events in an iCalendar file; events whose UID is already in the calendar are replaced. Floating times are read in timeZone.

Parameters and answers
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"
  }'
orgMailMailboxesCalendarsExport

GET/v1/orgs/:orgId/mail/mailboxes/:mailboxId/calendars/:calendarId/export

The calendar as an iCalendar file.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/calendars/{calendarId}/export' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"