API reference

Presence

Your status in every app, and the status of the people you work with.
POST/v1/presence/beat

Says you're here from one of your apps (device: 8 to 40 letters, digits, - and _; idle; gone when the app leaves). Lasts 7 minutes, or 30 idle; answers your status (status, shown, customStatus). At most 20 devices at once (429). People only.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Presence is only for the person signed in.
curl -X POST 'https://api.cactive.com.au/v1/presence/beat' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  userId: string
  status: "online" | "idle" | "dnd" | "invisible"
  shown: "offline" | "online" | "idle" | "dnd"
  customStatus: null | string
  customStatusClearAt: null | number
}
GET/v1/presence/me

Your status as you show to yourself: what you chose (status: online, idle, dnd, invisible), how it shows (shown) and your custom status. People only.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Presence is only for the person signed in.
curl 'https://api.cactive.com.au/v1/presence/me' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  userId: string
  status: "online" | "idle" | "dnd" | "invisible"
  shown: "offline" | "online" | "idle" | "dnd"
  customStatus: null | string
  customStatusClearAt: null | number
}
PATCH/v1/presence/me

Sets your status (status: online, idle, dnd or invisible), as Mirage's does; everyone who sees you hears it. Custom statuses are set in Mirage. People only.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Presence is only for the person signed in.
curl -X PATCH 'https://api.cactive.com.au/v1/presence/me' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  userId: string
  status: "online" | "idle" | "dnd" | "invisible"
  shown: "offline" | "online" | "idle" | "dnd"
  customStatus: null | string
  customStatusClearAt: null | number
}
POST/v1/presence/people

The status of up to 100 people (userIds, emails: their account's) who share an organisation with you, unless either of you blocked the other in Mirage; others are left out. Invisible reads offline. People only.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Errors

  • 403Presence is only for the person signed in.
curl -X POST 'https://api.cactive.com.au/v1/presence/people' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  presence: {
    userId: string
    email?: string
    status: "offline" | "online" | "idle" | "dnd"
  }[]
  at: number
}