SDK reference

Notifications and protocols

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

GET/v1/me/notifications/devices

The app's push registrations on your phones (deviceId is the phone's install id; rows of the withdrawn product apps too, until they're removed), with appId, platform, and the name, model, osVersion and appVersion the app sent. No push tokens.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/notifications/devices' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putMeNotificationsDevicesByDeviceId

PUT/v1/me/notifications/devices/:deviceId

Registers or refreshes a mobile app's Expo push token on this phone (token, platform, appId, optional name, model, osVersion, appVersion, and opensSealed from an Android build that decrypts end-to-end pushes itself, which then gets them as data-only messages). A mobile app's token ties the registration to its sign-in, so signing the app out removes it, and appId must be that app. People only, not assistants. Only the one app (appId home) registers: a withdrawn product app gets 410.

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/me/notifications/devices/{deviceId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "token": "example",
    "platform": "ios",
    "name": {},
    "model": {},
    "osVersion": {},
    "appVersion": {}
  }'
deleteMeNotificationsDevicesByDeviceId

DELETE/v1/me/notifications/devices/:deviceId

Removes an app's push registration on this phone (appId, default caity: a withdrawn app may remove its own). Signing the app out removes it too. People only, not assistants.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/notifications/devices/{deviceId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meNotificationsLiveActivities

GET/v1/me/notifications/live-activities

Your iPhone Live Activity registrations: per phone and app (home; maps and vehicles from the withdrawn apps until they expire), the push-to-start entry (kind: start) and each running flight activity (kind: activity, with orgId, hex, watchId or local), the APNs environment and, on the push-to-start entry, the flight activities the app last reported running (running). No tokens.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/notifications/live-activities' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putMeNotificationsLiveActivitiesStartByInstallId

PUT/v1/me/notifications/live-activities/start/:installId

Registers the app's push-to-start token on this iPhone (token in hex, appId home: a withdrawn app gets 410, environment production or development, bundleId, and running: the hexes of the flight activities running in the app, sent again whenever they change), so a flight watch can start a Live Activity at takeoff. From the signed-in iPhone app only; tied to its sign-in.

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/me/notifications/live-activities/start/{installId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "token": "example",
    "appId": "home",
    "environment": "production",
    "bundleId": "<bundleId>"
  }'
deleteMeNotificationsLiveActivitiesStartByInstallId

DELETE/v1/me/notifications/live-activities/start/:installId

Removes the app's push-to-start token on this phone (appId). Signing the app out removes it too.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/notifications/live-activities/start/{installId}?appId=home' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putMeNotificationsLiveActivitiesByActivityId

PUT/v1/me/notifications/live-activities/:activityId

Registers a running flight Live Activity's update token (token, appId, environment, bundleId, installId, orgId, hex, and watchId or local: true for one started with Track live). Needs maps:read in the org; from the signed-in iPhone app only.

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/me/notifications/live-activities/{activityId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
deleteMeNotificationsLiveActivitiesByActivityId

DELETE/v1/me/notifications/live-activities/:activityId

The activity ended or was dismissed on the phone: no more updates (installId, appId). stopped=1: the person stopped a flight's in the app, so no fresh one takes its place, as one swiped away gets.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/notifications/live-activities/{activityId}?installId=%3CinstallId%3E&appId=home' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meNotificationsSettings

GET/v1/me/notifications/settings

What reaches the person where, event by event, with the app each belongs to (the phone groups them by app: Home → Notifications). The same settings as ID → Notifications. textsOff: the event never texts or calls (Maps' events while Admin's "SMS for Maps alerts" is off), so the apps don't offer either.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/notifications/settings' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putMeNotificationsSettingsPrefs

PUT/v1/me/notifications/settings/prefs

Quiet hours, the time zone, important senders and calendar reminders (the events' channels stay as they are); people only, from their own apps. Cleaned as ID cleans them (cleanPrefs).

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/me/notifications/settings/prefs' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "quietHours": {
      "start": "example",
      "end": "example",
      "allowUrgent": true
    },
    "timeZone": "example",
    "vipSenders": [
      "example"
    ]
  }'
putMeNotificationsSettingsEvents

PUT/v1/me/notifications/settings/events

Some events' channels (the rest stay as they are); people only, from their own apps.

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/me/notifications/settings/events' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "events": {}
  }'
meNotificationsWebPush

GET/v1/me/notifications/web-push

Web push in your browsers: the key browsers subscribe with (publicKey, null where the stage has none) and your subscriptions, one per app per browser (subId, app, label, createdAt, lastUsedAt). No endpoints or keys.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/notifications/web-push' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeNotificationsWebPush

POST/v1/me/notifications/web-push

Turns on web push for one app in this browser (the header's bell): the browser's endpoint and keys (p256dh, auth), the web app, the browser's id (browserId, so a notice shows once per browser) and a label. Endpoints must be a browser push service's. A browser signed in as someone else moves to you. Answers the subId. People only, not assistants; 503 where the stage has no web push key.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/notifications/web-push' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "endpoint": "https://example.com",
    "keys": {
      "p256dh": "example",
      "auth": "example"
    },
    "app": "example"
  }'
deleteMeNotificationsWebPushBySubId

DELETE/v1/me/notifications/web-push/:subId

Turns off one of your web push subscriptions (the SHA-256 of its endpoint, base64url). Signing out of the app does it too.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/notifications/web-push/{subId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meNotificationsPush

GET/v1/me/notifications/push

Where your notices go: phones with the app (phones: deviceId, appId, platform, name, model, osVersion, appVersion, createdAt, updatedAt), your browsers with web push, one row each across apps (browsers: subId, label, host, createdAt, lastUsedAt) and the key a browser subscribes with (publicKey). No tokens, endpoints or keys.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/notifications/push' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
deleteMeNotificationsBrowsersBySubId

DELETE/v1/me/notifications/browsers/:subId

Removes a browser: turns web push off there for every app (a subId from GET /v1/me/notifications/push). Another person's id does nothing.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/notifications/browsers/{subId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeNotificationsTest

POST/v1/me/notifications/test

Sends a sample notice to your phones and browsers, once a minute. Answers what it reached: mobile (devices, queued) and web (sent, devices). People only, not assistants.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/notifications/test' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
meNotifications

GET/v1/me/notifications

Your notifications, newest first (cursor, limit): title, body, link, read, and whether one waits for an acknowledgement (escalating alerts). app: only that mobile app's notices (home: every app's). People only.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/notifications' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMeNotificationsRead

POST/v1/me/notifications/read

Marks notifications read (noticeIds, up to 100).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/notifications/read' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "noticeIds": [
      "example"
    ]
  }'
postMeNotificationsAck

POST/v1/me/notifications/:noticeId/ack

Acknowledges a notification: its escalation (later texts or calls) stops. acked: false when it already was.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/notifications/{noticeId}/ack' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgNotifyProtocolsTemplates

GET/v1/orgs/:orgId/notify/protocols/templates

Ready-made notification protocols (production on-call, meeting guard, invitation chaser, VIP mail, service desk SLA, agent jobs).

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/notify/protocols/templates' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgNotifyProtocols

GET/v1/orgs/:orgId/notify/protocols

The organization's notification protocols with their rules and what each is attached to.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/notify/protocols' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgNotifyProtocols

POST/v1/orgs/:orgId/notify/protocols

Creates a protocol from { template } or { name, description?, enabled?, rules } (rules: events, optional match on event attributes, steps with minutes and channels, roles, overrideQuietHours, beforeEvent). Owners and admins.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/notify/protocols' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgNotifyProtocolsByProtocolId

GET/v1/orgs/:orgId/notify/protocols/:protocolId

One protocol with its attachments.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/notify/protocols/{protocolId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putOrgNotifyProtocolsByProtocolId

PUT/v1/orgs/:orgId/notify/protocols/:protocolId

Replaces a protocol's name, description, on/off and rules. Owners and admins.

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/notify/protocols/{protocolId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "rules": [
      {
        "events": [],
        "steps": [
          {
            "afterMinutes": 1,
            "channels": [
              "inapp"
            ]
          }
        ]
      }
    ]
  }'
deleteOrgNotifyProtocolsByProtocolId

DELETE/v1/orgs/:orgId/notify/protocols/:protocolId

Deletes a protocol and its attachments. Owners and admins.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/notify/protocols/{protocolId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgNotifyProtocolsAttachments

POST/v1/orgs/:orgId/notify/protocols/:protocolId/attachments

Attaches the protocol to { type, id, label? }: the whole organization (org) or a Serverless App Service, Issues space, calendar, mailbox or agent. Events about it then follow the protocol. Owners and admins.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/notify/protocols/{protocolId}/attachments' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "org",
    "id": "<id>"
  }'
deleteOrgNotifyProtocolsAttachmentsByTargetId

DELETE/v1/orgs/:orgId/notify/protocols/:protocolId/attachments/:resourceType/:targetId

Detaches the protocol from that resource. Owners and admins.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/notify/protocols/{protocolId}/attachments/{resourceType}/{targetId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"