API reference

Documents, Sheets and Slides

Creating and co-editing documents, spreadsheets and presentations, their versions, comments, templates, imports, downloads and search.
GET/v1/hooks/office/render/:token/state

The file a render token names (a two-minute token for printing and PDF downloads), for the print page.

Auth
None.

Path parameters

  • token

    A secret from a link: an issue automation rule's incoming-webhook token (shown once when issued), a map's share link, a notification recipient's confirm and unsubscribe link, a Drive public link (/l/<token>), a Vehicles drive's share link, or a Mirage interaction's token (itk_…, sent with the interaction, good for 15 minutes), or the token in the link to a file of a message Mirage sent to Discord, or a Marketing link's sealed token (a tracked click, the open pixel, unsubscribe and the preference centre, a double opt-in confirmation); or a Food recipe's public link (/r/<token>) or a household's calendar feed.

curl 'https://api.cactive.com.au/v1/hooks/office/render/{token}/state'
Send it from this page with your session or a key.

Response 200

{
  fileId: string
  kind?: "video" | "document" | "spreadsheet" | "presentation"
  format: "pdf" | "png" | "print"
  options: {
    [key: string]: string
  }
  state: string
}
GET/v1/hooks/office/render/:token/media/:mediaId

A picture in the file a render token names.

Auth
None.

Path parameters

  • token

    A secret from a link: an issue automation rule's incoming-webhook token (shown once when issued), a map's share link, a notification recipient's confirm and unsubscribe link, a Drive public link (/l/<token>), a Vehicles drive's share link, or a Mirage interaction's token (itk_…, sent with the interaction, good for 15 minutes), or the token in the link to a file of a message Mirage sent to Discord, or a Marketing link's sealed token (a tracked click, the open pixel, unsubscribe and the preference centre, a double opt-in confirmation); or a Food recipe's public link (/r/<token>) or a household's calendar feed.

  • mediaId

    A picture's or other media's id in a document, spreadsheet, presentation or video project (med_…): pictures, Video's proxies, its poster and transcription mixdowns.

curl 'https://api.cactive.com.au/v1/hooks/office/render/{token}/media/{mediaId}'
Send it from this page with your session or a key.

Response 200

{
  url: string
  mime: string
}
POST/v1/orgs/:orgId/office/files

A new document, spreadsheet or presentation (blank, a built-in template or one of the org's), in parentId or My Drive.

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

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • kind"document" | "spreadsheet" | "presentation" | "video"required
  • parentIdstring

    3–64 characters.

  • namestring

    1–255 characters.

  • templateIdstring

    3–64 characters.

  • localestring

    Up to 20 characters.

  • todaystring

    Matches ^\d{4}-\d{2}-\d{2}$.

  • meetingobject
  • meeting.titlestring

    Up to 200 characters.

  • meeting.timestring

    Up to 60 characters.

  • meeting.guestsstring[]

    Up to 50 items. Each up to 120 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "kind": "document"
  }'
Send it from this page with your session or a key.

Response 201

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  kind: "video" | "document" | "spreadsheet" | "presentation"
  app: "documents" | "sheets" | "slides" | "video"
  path: string
  rights: {
    view: boolean
    comment: boolean
    edit: boolean
    share: boolean
    delete: boolean
  }
}
GET/v1/orgs/:orgId/office/files/:fileId

A document, spreadsheet or presentation: its Drive item, kind, what you may do (rights: edit, comment, share) and where it is.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  kind: "video" | "document" | "spreadsheet" | "presentation"
  app: "documents" | "sheets" | "slides" | "video"
  path: string
  rights: {
    view: boolean
    comment: boolean
    edit: boolean
    share: boolean
    delete: boolean
  }
}
POST/v1/orgs/:orgId/office/files/:fileId/copy

Makes a copy ("Copy of …", or name) in parentId or beside it, with its pictures; versionId copies an earlier version.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Request body

  • namestring

    1–255 characters.

  • parentIdstring

    3–64 characters.

  • versionIdstring

    Up to 64 characters.

  • withProxiesboolean

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/copy' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "parentId": "<parentId>",
    "versionId": "<versionId>"
  }'
Send it from this page with your session or a key.

Response 201

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  kind: "video" | "document" | "spreadsheet" | "presentation"
  app: "documents" | "sheets" | "slides" | "video"
  path: string
  rights: {
    view: boolean
    comment: boolean
    edit: boolean
    share: boolean
    delete: boolean
  }
}
GET/v1/orgs/:orgId/office/files/:fileId/collab

The shared document with the caller's rights and a socket ticket (ticket=0 without; state=0 for a ticket alone, on reconnects).

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Query parameters

  • ticket"0" | "1"
  • state"0" | "1"
  • tabstring

    Up to 64 characters.

  • devicestring

    Up to 60 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/collab' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  epoch: null | string
  seq: number
  state: null | string
  base: string | number
  canWrite: boolean
  canComment?: boolean
  socket: null | {
    url: string
    ticket: null | string
  }
}
POST/v1/orgs/:orgId/office/files/:fileId/collab/seed

Sets up a file nobody has edited yet: the first update (base64 Yjs) on the version base. 409 when it's already set up.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
  • 413Too large.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/collab/seed' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

undefined
POST/v1/orgs/:orgId/office/files/:fileId/collab/updates

Sends an edit (update, base64 Yjs) at epoch; answers its seq. For edits too large for the socket (over 90 KB). 409 when the epoch is stale: reload the state.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Request body (up to 2,867 KB)

  • epochstringrequired

    1–64 characters.

  • updatestringrequired

    At least 1 character.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
  • 413Too large.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/collab/updates' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "epoch": "example",
    "update": "2026-01-01"
  }'
Send it from this page with your session or a key.

Response 200

{
  seq: number
}
GET/v1/orgs/:orgId/office/files/:fileId/collab/updates

Edits after after at epoch, or { reset: true } when the file was replaced since (a restore or an upload): reload the state.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Query parameters

  • epochstringrequired

    1–64 characters.

  • afterintegerrequired

    ≥ 0. Coerced from a string.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/collab/updates?epoch=example&after=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  reset: true
} | {
  reset: false
  updates: {
    seq: number
    update: string
  }[]
  state?: null | string
  seq?: number
}
POST/v1/orgs/:orgId/office/files/:fileId/checkpoint

Saves a checkpoint now (a Drive version): on leaving, every 10 minutes of editing, or named.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Request body

  • reason"interval" | "leave" | "named"required
  • namestring

    Up to 200 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/checkpoint' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "reason": "interval"
  }'
Send it from this page with your session or a key.

Response 200

{
  saved: boolean
  seq: number
}
POST/v1/orgs/:orgId/office/files/:fileId/media

A picture into the file: a one-part upload link, then …/complete; GET a one-hour link to it.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Request body

  • namestringrequired

    1–255 characters.

  • sizeintegerrequired

    ≥ 1.

  • mimestringrequired

    Up to 100 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/media' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "size": 1,
    "mime": "example"
  }'
Send it from this page with your session or a key.

Response 201

{
  mediaId: string
  url: string
  method: "PUT"
  expiresIn: number
  uploadId: string
  partSize: number
  partCount: number
  urls: {
    [key: number]: string
  }
}
POST/v1/orgs/:orgId/office/files/:fileId/media/:mediaId/complete

Finishes a picture's upload (after the PUT to the link POST …/media answered).

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

  • mediaId

    A picture's or other media's id in a document, spreadsheet, presentation or video project (med_…): pictures, Video's proxies, its poster and transcription mixdowns.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/media/{mediaId}/complete' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  mediaId: string
  size: number
  mime: string
}
GET/v1/orgs/:orgId/office/files/:fileId/media/:mediaId

A short-lived link to a picture in the file.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

  • mediaId

    A picture's or other media's id in a document, spreadsheet, presentation or video project (med_…): pictures, Video's proxies, its poster and transcription mixdowns.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/media/{mediaId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  url: string
  mime: string
  size: number
  expiresIn: number
  canEdit: boolean
}
GET/v1/orgs/:orgId/office/files/:fileId/versions

Versions (Drive's, newest first) with names and pins, whether you may manage them, and how many changes aren't in a version yet (unsaved).

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/versions' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  versions: {
    versionId: string
    name: string
    size: number
    mime: string
    checksum?: string
    uploadedBy: string
    createdAt: number
    current: boolean
    restoredFrom?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    label?: string
    pinned?: boolean
  }[]
  canManage: boolean
  unsaved: number
}
GET/v1/orgs/:orgId/office/files/:fileId/versions/:versionId/content

An earlier version's state (base64 Yjs) for viewing. Editors only, as in Drive.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

  • versionId

    Version id: a saved page version, as listed by the page history, an issue space's version (release, ver_…), or a Drive file's version (fvr_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/versions/{versionId}/content' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  versionId: string
  kind: "video" | "document" | "spreadsheet" | "presentation"
  state: null | string
  createdAt: number
  uploadedBy: string
  label?: string
  pinned: boolean
}
PATCH/v1/orgs/:orgId/office/files/:fileId/versions/:versionId

Names (name, null to clear) or pins (pinned) a version. Pinned versions aren't pruned.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

  • versionId

    Version id: a saved page version, as listed by the page history, an issue space's version (release, ver_…), or a Drive file's version (fvr_…).

Request body

  • namestringor null

    Up to 200 characters.

  • pinnedboolean

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/versions/{versionId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "pinned": true
  }'
Send it from this page with your session or a key.

Response 200

{
  versionId: string
  label?: string
  pinned: boolean
}
POST/v1/orgs/:orgId/office/files/:fileId/versions/:versionId/restore

Makes an earlier version current again (a new version with its content); open editors reload.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

  • versionId

    Version id: a saved page version, as listed by the page history, an issue space's version (release, ver_…), or a Drive file's version (fvr_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/versions/{versionId}/restore' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }
  versionId: string
  restoredFrom: string
}
GET/v1/orgs/:orgId/office/files/:fileId/threads

Comment threads on the file, with their anchors (text, cell, slide element or point) and authors' names.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/threads' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  threads: {
    id: string
    createdAt: number
    updatedAt: number
    comments: {
      id: string
      authorId: string
      authorName?: string
      body: string
      createdAt: number
      editedAt?: number
    }[]
    resolved: boolean
    resolvedBy?: string
    resolvedAt?: number
    anchor: {
      type: "text"
      from: string
      to: string
      quote?: string
    } | {
      type: "cell"
      sheetId: string
      rowId: string
      colId: string
      label?: string
    } | {
      type: "element"
      slideId: string
      elementId: string
    } | {
      type: "point"
      x: number
      y: number
    } | {
      type: "time"
      sequenceId: string
      t: number
      duration?: number
      x?: number
      y?: number
    } | {
      type: "file"
    }
    mentions?: string[]
    metadata?: {
      [key: string]: unknown
    }
  }[]
}
POST/v1/orgs/:orgId/office/files/:fileId/threads

Starts a thread at anchor with body (Markdown; @[Name](usr_…) mentions notify). Commenters and up.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Request body

  • anchorobject | object | object | object | object | objectrequired
  • bodystringrequired

    1–8,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/threads' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "anchor": {},
    "body": "example"
  }'
Send it from this page with your session or a key.

Response 201

{
  thread: null | {
    id: string
    createdAt: number
    updatedAt: number
    comments: {
      id: string
      authorId: string
      authorName?: string
      body: string
      createdAt: number
      editedAt?: number
    }[]
    resolved: boolean
    resolvedBy?: string
    resolvedAt?: number
    anchor: {
      type: "text"
      from: string
      to: string
      quote?: string
    } | {
      type: "cell"
      sheetId: string
      rowId: string
      colId: string
      label?: string
    } | {
      type: "element"
      slideId: string
      elementId: string
    } | {
      type: "point"
      x: number
      y: number
    } | {
      type: "time"
      sequenceId: string
      t: number
      duration?: number
      x?: number
      y?: number
    } | {
      type: "file"
    }
    mentions?: string[]
    metadata?: {
      [key: string]: unknown
    }
  }
}
POST/v1/orgs/:orgId/office/files/:fileId/threads/:threadId/comments

Replies to a thread (and reopens it if it was resolved).

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

  • threadId

    Conversation id (thr_…), or in Mirage a thread id (mth_…).

Request body

  • bodystringrequired

    1–8,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/threads/{threadId}/comments' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "body": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  thread: null | {
    id: string
    createdAt: number
    updatedAt: number
    comments: {
      id: string
      authorId: string
      authorName?: string
      body: string
      createdAt: number
      editedAt?: number
    }[]
    resolved: boolean
    resolvedBy?: string
    resolvedAt?: number
    anchor: {
      type: "text"
      from: string
      to: string
      quote?: string
    } | {
      type: "cell"
      sheetId: string
      rowId: string
      colId: string
      label?: string
    } | {
      type: "element"
      slideId: string
      elementId: string
    } | {
      type: "point"
      x: number
      y: number
    } | {
      type: "time"
      sequenceId: string
      t: number
      duration?: number
      x?: number
      y?: number
    } | {
      type: "file"
    }
    mentions?: string[]
    metadata?: {
      [key: string]: unknown
    }
  }
}
PATCH/v1/orgs/:orgId/office/files/:fileId/threads/:threadId

Resolves or reopens a thread (resolved). Anyone who can comment.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

  • threadId

    Conversation id (thr_…), or in Mirage a thread id (mth_…).

Request body

  • resolvedbooleanrequired

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/threads/{threadId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "resolved": true
  }'
Send it from this page with your session or a key.

Response 200

{
  thread: null | {
    id: string
    createdAt: number
    updatedAt: number
    comments: {
      id: string
      authorId: string
      authorName?: string
      body: string
      createdAt: number
      editedAt?: number
    }[]
    resolved: boolean
    resolvedBy?: string
    resolvedAt?: number
    anchor: {
      type: "text"
      from: string
      to: string
      quote?: string
    } | {
      type: "cell"
      sheetId: string
      rowId: string
      colId: string
      label?: string
    } | {
      type: "element"
      slideId: string
      elementId: string
    } | {
      type: "point"
      x: number
      y: number
    } | {
      type: "time"
      sequenceId: string
      t: number
      duration?: number
      x?: number
      y?: number
    } | {
      type: "file"
    }
    mentions?: string[]
    metadata?: {
      [key: string]: unknown
    }
  }
}
DELETE/v1/orgs/:orgId/office/files/:fileId/threads/:threadId

Deletes a thread. Its author, or an editor of the file.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

  • threadId

    Conversation id (thr_…), or in Mirage a thread id (mth_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/threads/{threadId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

PATCH/v1/orgs/:orgId/office/files/:fileId/threads/:threadId/comments/:commentId

Edits your own comment (body).

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

  • threadId

    Conversation id (thr_…), or in Mirage a thread id (mth_…).

  • commentId

    Comment id (icm_…).

Request body

  • bodystringrequired

    1–8,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/threads/{threadId}/comments/{commentId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "body": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  thread: null | {
    id: string
    createdAt: number
    updatedAt: number
    comments: {
      id: string
      authorId: string
      authorName?: string
      body: string
      createdAt: number
      editedAt?: number
    }[]
    resolved: boolean
    resolvedBy?: string
    resolvedAt?: number
    anchor: {
      type: "text"
      from: string
      to: string
      quote?: string
    } | {
      type: "cell"
      sheetId: string
      rowId: string
      colId: string
      label?: string
    } | {
      type: "element"
      slideId: string
      elementId: string
    } | {
      type: "point"
      x: number
      y: number
    } | {
      type: "time"
      sequenceId: string
      t: number
      duration?: number
      x?: number
      y?: number
    } | {
      type: "file"
    }
    mentions?: string[]
    metadata?: {
      [key: string]: unknown
    }
  }
}
DELETE/v1/orgs/:orgId/office/files/:fileId/threads/:threadId/comments/:commentId

Deletes a comment: your own, or any as an editor of the file.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

  • threadId

    Conversation id (thr_…), or in Mirage a thread id (mth_…).

  • commentId

    Comment id (icm_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/threads/{threadId}/comments/{commentId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  thread: null | {
    id: string
    createdAt: number
    updatedAt: number
    comments: {
      id: string
      authorId: string
      authorName?: string
      body: string
      createdAt: number
      editedAt?: number
    }[]
    resolved: boolean
    resolvedBy?: string
    resolvedAt?: number
    anchor: {
      type: "text"
      from: string
      to: string
      quote?: string
    } | {
      type: "cell"
      sheetId: string
      rowId: string
      colId: string
      label?: string
    } | {
      type: "element"
      slideId: string
      elementId: string
    } | {
      type: "point"
      x: number
      y: number
    } | {
      type: "time"
      sequenceId: string
      t: number
      duration?: number
      x?: number
      y?: number
    } | {
      type: "file"
    }
    mentions?: string[]
    metadata?: {
      [key: string]: unknown
    }
  }
}
POST/v1/orgs/:orgId/office/files/:fileId/mentions

People @mentioned who can't open the file yet (the commenter is asked to share first).

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Request body

  • userIdsstring[]required

    Up to 50 items. Each up to 64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/mentions' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "userIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  withoutAccess: string[]
}
GET/v1/orgs/:orgId/office/files/:fileId/lock

Editing locks (Studio: one editor at a time; renew every minute).

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/lock' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  lock: {
    lockedBy?: string
    lockedName?: string
    lockUntil?: number
    mine: boolean
  }
}
POST/v1/orgs/:orgId/office/files/:fileId/lock

Takes or renews the editing lock for one-at-a-time editing (renew every minute). 423 with who has it when someone else does.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/lock' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  lock: {
    lockedBy?: string
    lockedName?: string
    lockUntil?: number
    mine: boolean
  }
}
DELETE/v1/orgs/:orgId/office/files/:fileId/lock

Gives up the editing lock.

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/office/files/{fileId}/lock' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

GET/v1/orgs/:orgId/office/templates

The template gallery for kind: Blank, the organization's own templates you can read, then the built-ins.

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

Path parameters

  • orgId

    Organization id (org_…).

Query parameters

  • kind"document" | "spreadsheet" | "presentation" | "video"

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/office/templates' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  templates: {
    templateId: string
    kind: "video" | "document" | "spreadsheet" | "presentation"
    name: string
    category?: string
    fileId?: string
    builtIn: boolean
  }[]
}
POST/v1/orgs/:orgId/office/templates

Makes a file (fileId) one of the organization's templates, with an optional name and category. Editors of the file; not in personal spaces.

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

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • fileIdstringrequired

    Matches ^fil_[0-9a-z]{6,40}$.

  • namestring

    Up to 120 characters.

  • categorystring

    Up to 60 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/templates' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "fileId": "<fileId>"
  }'
Send it from this page with your session or a key.

Response 201

{
  template: {
    templateId: string
    fileId: string
    kind: "video" | "document" | "spreadsheet" | "presentation"
    name: string
    category?: string
    builtIn: false
  }
}
DELETE/v1/orgs/:orgId/office/templates/:fileId

Takes a file off the organization's templates (the file stays).

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

Path parameters

  • orgId

    Organization id (org_…).

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/office/templates/{fileId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

POST/v1/orgs/:orgId/office/imports

Opens a Word, Excel, PowerPoint, OpenDocument, CSV or Markdown file as a native one beside it (a job).

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

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • itemIdstringrequired

    3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/imports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemId": "<itemId>"
  }'
Send it from this page with your session or a key.

Response 202

{
  job: {
    jobId: string
    type: "import" | "export" | "render"
    status: "queued" | "done" | "failed" | "running"
    result?: {
      [key: string]: unknown
    }
    error?: string
  }
}
POST/v1/orgs/:orgId/office/exports

Downloads a file in another format (a job; ask GET /jobs/:jobId until it's done, then follow result.url).

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

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • fileIdstringrequired

    Matches ^fil_[0-9a-z]{6,40}$.

  • formatstringrequired

    Up to 10 characters.

  • versionIdstring

    Up to 64 characters.

  • sheetIdstring

    Up to 40 characters.

  • slideIdstring

    Up to 40 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/exports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "fileId": "<fileId>",
    "format": "example"
  }'
Send it from this page with your session or a key.

Response 202

{
  job: {
    jobId: string
    type: "import" | "export" | "render"
    status: "queued" | "done" | "failed" | "running"
    result?: {
      [key: string]: unknown
    }
    error?: string
  }
}
GET/v1/orgs/:orgId/office/jobs/:jobId

An import or export job: status (queued, running, done, failed) and, when done, the new file or a download link.

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

Path parameters

  • orgId

    Organization id (org_…).

  • jobId

    Job id: an agent job (job_…), under pipelines a pipeline job (pjb_…), or under crm an import or export (cjb_…); under marketing a list import (mkj_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/office/jobs/{jobId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  job: {
    jobId: string
    type: "import" | "export" | "render"
    status: "queued" | "done" | "failed" | "running"
    result?: {
      [key: string]: unknown
    }
    error?: string
  }
}
GET/v1/orgs/:orgId/office/recent

The person's files of a kind: recently opened first (view: recent, shared, starred or all).

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

Path parameters

  • orgId

    Organization id (org_…).

Query parameters

  • kind"document" | "spreadsheet" | "presentation" | "video"required
  • view"recent" | "shared" | "starred" | "all"

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/office/recent?kind=document' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  items: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
}
POST/v1/orgs/:orgId/office/assist

Writing, formula and slide help for the file's editor (a model call; counted per day).

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

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • fileIdstringrequired

    Matches ^fil_[0-9a-z]{6,40}$.

  • taskstringrequired

    Up to 40 characters.

  • inputstringrequired

    1–20,000 characters.

  • contextstring

    Up to 20,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/office/assist' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "fileId": "<fileId>",
    "task": "example",
    "input": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  model: string
  data?: {
    [key: string]: unknown
  }
  task: string
  text: string
}
POST/v1/me/office/files

A new document, spreadsheet or presentation (blank, a built-in template or one of the org's), in parentId or My Drive.

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

Request body

  • kind"document" | "spreadsheet" | "presentation" | "video"required
  • parentIdstring

    3–64 characters.

  • namestring

    1–255 characters.

  • templateIdstring

    3–64 characters.

  • localestring

    Up to 20 characters.

  • todaystring

    Matches ^\d{4}-\d{2}-\d{2}$.

  • meetingobject
  • meeting.titlestring

    Up to 200 characters.

  • meeting.timestring

    Up to 60 characters.

  • meeting.guestsstring[]

    Up to 50 items. Each up to 120 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/files' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "kind": "document"
  }'
Send it from this page with your session or a key.

Response 201

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  kind: "video" | "document" | "spreadsheet" | "presentation"
  app: "documents" | "sheets" | "slides" | "video"
  path: string
  rights: {
    view: boolean
    comment: boolean
    edit: boolean
    share: boolean
    delete: boolean
  }
}
GET/v1/me/office/files/:fileId

A document, spreadsheet or presentation: its Drive item, kind, what you may do (rights: edit, comment, share) and where it is.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/office/files/{fileId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  kind: "video" | "document" | "spreadsheet" | "presentation"
  app: "documents" | "sheets" | "slides" | "video"
  path: string
  rights: {
    view: boolean
    comment: boolean
    edit: boolean
    share: boolean
    delete: boolean
  }
}
POST/v1/me/office/files/:fileId/copy

Makes a copy ("Copy of …", or name) in parentId or beside it, with its pictures; versionId copies an earlier version.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Request body

  • namestring

    1–255 characters.

  • parentIdstring

    3–64 characters.

  • versionIdstring

    Up to 64 characters.

  • withProxiesboolean

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/files/{fileId}/copy' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "parentId": "<parentId>",
    "versionId": "<versionId>"
  }'
Send it from this page with your session or a key.

Response 201

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
    path: {
      itemId: string
      name: string
    }[]
    drive: {
      driveId: string
      kind: "user" | "shared"
      name: string
    }
    capabilities: {
      view: boolean
      comment: boolean
      edit: boolean
      share: boolean
      delete: boolean
    }
    shares?: {
      principalId: string
      type: "user" | "team"
      role: "viewer" | "commenter" | "editor"
      inherited?: {
        itemId: string
        name: string
      }
    }[]
    link: {
      scope: "org" | "restricted" | "anyone"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  kind: "video" | "document" | "spreadsheet" | "presentation"
  app: "documents" | "sheets" | "slides" | "video"
  path: string
  rights: {
    view: boolean
    comment: boolean
    edit: boolean
    share: boolean
    delete: boolean
  }
}
GET/v1/me/office/files/:fileId/collab

The shared document with the caller's rights and a socket ticket (ticket=0 without; state=0 for a ticket alone, on reconnects).

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Query parameters

  • ticket"0" | "1"
  • state"0" | "1"
  • tabstring

    Up to 64 characters.

  • devicestring

    Up to 60 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/office/files/{fileId}/collab' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  epoch: null | string
  seq: number
  state: null | string
  base: string | number
  canWrite: boolean
  canComment?: boolean
  socket: null | {
    url: string
    ticket: null | string
  }
}
POST/v1/me/office/files/:fileId/collab/seed

Sets up a file nobody has edited yet: the first update (base64 Yjs) on the version base. 409 when it's already set up.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
  • 413Too large.
curl -X POST 'https://api.cactive.com.au/v1/me/office/files/{fileId}/collab/seed' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

undefined
POST/v1/me/office/files/:fileId/collab/updates

Sends an edit (update, base64 Yjs) at epoch; answers its seq. For edits too large for the socket (over 90 KB). 409 when the epoch is stale: reload the state.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Request body (up to 2,867 KB)

  • epochstringrequired

    1–64 characters.

  • updatestringrequired

    At least 1 character.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
  • 413Too large.
curl -X POST 'https://api.cactive.com.au/v1/me/office/files/{fileId}/collab/updates' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "epoch": "example",
    "update": "2026-01-01"
  }'
Send it from this page with your session or a key.

Response 200

{
  seq: number
}
GET/v1/me/office/files/:fileId/collab/updates

Edits after after at epoch, or { reset: true } when the file was replaced since (a restore or an upload): reload the state.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Query parameters

  • epochstringrequired

    1–64 characters.

  • afterintegerrequired

    ≥ 0. Coerced from a string.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/office/files/{fileId}/collab/updates?epoch=example&after=1' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  reset: true
} | {
  reset: false
  updates: {
    seq: number
    update: string
  }[]
  state?: null | string
  seq?: number
}
POST/v1/me/office/files/:fileId/checkpoint

Saves a checkpoint now (a Drive version): on leaving, every 10 minutes of editing, or named.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Request body

  • reason"interval" | "leave" | "named"required
  • namestring

    Up to 200 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/files/{fileId}/checkpoint' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "reason": "interval"
  }'
Send it from this page with your session or a key.

Response 200

{
  saved: boolean
  seq: number
}
POST/v1/me/office/files/:fileId/media

A picture into the file: a one-part upload link, then …/complete; GET a one-hour link to it.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Request body

  • namestringrequired

    1–255 characters.

  • sizeintegerrequired

    ≥ 1.

  • mimestringrequired

    Up to 100 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/files/{fileId}/media' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "size": 1,
    "mime": "example"
  }'
Send it from this page with your session or a key.

Response 201

{
  mediaId: string
  url: string
  method: "PUT"
  expiresIn: number
  uploadId: string
  partSize: number
  partCount: number
  urls: {
    [key: number]: string
  }
}
POST/v1/me/office/files/:fileId/media/:mediaId/complete

Finishes a picture's upload (after the PUT to the link POST …/media answered).

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

  • mediaId

    A picture's or other media's id in a document, spreadsheet, presentation or video project (med_…): pictures, Video's proxies, its poster and transcription mixdowns.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/files/{fileId}/media/{mediaId}/complete' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  mediaId: string
  size: number
  mime: string
}
GET/v1/me/office/files/:fileId/media/:mediaId

A short-lived link to a picture in the file.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

  • mediaId

    A picture's or other media's id in a document, spreadsheet, presentation or video project (med_…): pictures, Video's proxies, its poster and transcription mixdowns.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/office/files/{fileId}/media/{mediaId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  url: string
  mime: string
  size: number
  expiresIn: number
  canEdit: boolean
}
GET/v1/me/office/files/:fileId/versions

Versions (Drive's, newest first) with names and pins, whether you may manage them, and how many changes aren't in a version yet (unsaved).

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/office/files/{fileId}/versions' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  versions: {
    versionId: string
    name: string
    size: number
    mime: string
    checksum?: string
    uploadedBy: string
    createdAt: number
    current: boolean
    restoredFrom?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    label?: string
    pinned?: boolean
  }[]
  canManage: boolean
  unsaved: number
}
GET/v1/me/office/files/:fileId/versions/:versionId/content

An earlier version's state (base64 Yjs) for viewing. Editors only, as in Drive.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

  • versionId

    Version id: a saved page version, as listed by the page history, an issue space's version (release, ver_…), or a Drive file's version (fvr_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/office/files/{fileId}/versions/{versionId}/content' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  versionId: string
  kind: "video" | "document" | "spreadsheet" | "presentation"
  state: null | string
  createdAt: number
  uploadedBy: string
  label?: string
  pinned: boolean
}
PATCH/v1/me/office/files/:fileId/versions/:versionId

Names (name, null to clear) or pins (pinned) a version. Pinned versions aren't pruned.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

  • versionId

    Version id: a saved page version, as listed by the page history, an issue space's version (release, ver_…), or a Drive file's version (fvr_…).

Request body

  • namestringor null

    Up to 200 characters.

  • pinnedboolean

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PATCH 'https://api.cactive.com.au/v1/me/office/files/{fileId}/versions/{versionId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "pinned": true
  }'
Send it from this page with your session or a key.

Response 200

{
  versionId: string
  label?: string
  pinned: boolean
}
POST/v1/me/office/files/:fileId/versions/:versionId/restore

Makes an earlier version current again (a new version with its content); open editors reload.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

  • versionId

    Version id: a saved page version, as listed by the page history, an issue space's version (release, ver_…), or a Drive file's version (fvr_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/files/{fileId}/versions/{versionId}/restore' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }
  versionId: string
  restoredFrom: string
}
GET/v1/me/office/files/:fileId/threads

Comment threads on the file, with their anchors (text, cell, slide element or point) and authors' names.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/office/files/{fileId}/threads' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  threads: {
    id: string
    createdAt: number
    updatedAt: number
    comments: {
      id: string
      authorId: string
      authorName?: string
      body: string
      createdAt: number
      editedAt?: number
    }[]
    resolved: boolean
    resolvedBy?: string
    resolvedAt?: number
    anchor: {
      type: "text"
      from: string
      to: string
      quote?: string
    } | {
      type: "cell"
      sheetId: string
      rowId: string
      colId: string
      label?: string
    } | {
      type: "element"
      slideId: string
      elementId: string
    } | {
      type: "point"
      x: number
      y: number
    } | {
      type: "time"
      sequenceId: string
      t: number
      duration?: number
      x?: number
      y?: number
    } | {
      type: "file"
    }
    mentions?: string[]
    metadata?: {
      [key: string]: unknown
    }
  }[]
}
POST/v1/me/office/files/:fileId/threads

Starts a thread at anchor with body (Markdown; @[Name](usr_…) mentions notify). Commenters and up.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Request body

  • anchorobject | object | object | object | object | objectrequired
  • bodystringrequired

    1–8,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/files/{fileId}/threads' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "anchor": {},
    "body": "example"
  }'
Send it from this page with your session or a key.

Response 201

{
  thread: null | {
    id: string
    createdAt: number
    updatedAt: number
    comments: {
      id: string
      authorId: string
      authorName?: string
      body: string
      createdAt: number
      editedAt?: number
    }[]
    resolved: boolean
    resolvedBy?: string
    resolvedAt?: number
    anchor: {
      type: "text"
      from: string
      to: string
      quote?: string
    } | {
      type: "cell"
      sheetId: string
      rowId: string
      colId: string
      label?: string
    } | {
      type: "element"
      slideId: string
      elementId: string
    } | {
      type: "point"
      x: number
      y: number
    } | {
      type: "time"
      sequenceId: string
      t: number
      duration?: number
      x?: number
      y?: number
    } | {
      type: "file"
    }
    mentions?: string[]
    metadata?: {
      [key: string]: unknown
    }
  }
}
POST/v1/me/office/files/:fileId/threads/:threadId/comments

Replies to a thread (and reopens it if it was resolved).

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

  • threadId

    Conversation id (thr_…), or in Mirage a thread id (mth_…).

Request body

  • bodystringrequired

    1–8,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/files/{fileId}/threads/{threadId}/comments' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "body": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  thread: null | {
    id: string
    createdAt: number
    updatedAt: number
    comments: {
      id: string
      authorId: string
      authorName?: string
      body: string
      createdAt: number
      editedAt?: number
    }[]
    resolved: boolean
    resolvedBy?: string
    resolvedAt?: number
    anchor: {
      type: "text"
      from: string
      to: string
      quote?: string
    } | {
      type: "cell"
      sheetId: string
      rowId: string
      colId: string
      label?: string
    } | {
      type: "element"
      slideId: string
      elementId: string
    } | {
      type: "point"
      x: number
      y: number
    } | {
      type: "time"
      sequenceId: string
      t: number
      duration?: number
      x?: number
      y?: number
    } | {
      type: "file"
    }
    mentions?: string[]
    metadata?: {
      [key: string]: unknown
    }
  }
}
PATCH/v1/me/office/files/:fileId/threads/:threadId

Resolves or reopens a thread (resolved). Anyone who can comment.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

  • threadId

    Conversation id (thr_…), or in Mirage a thread id (mth_…).

Request body

  • resolvedbooleanrequired

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PATCH 'https://api.cactive.com.au/v1/me/office/files/{fileId}/threads/{threadId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "resolved": true
  }'
Send it from this page with your session or a key.

Response 200

{
  thread: null | {
    id: string
    createdAt: number
    updatedAt: number
    comments: {
      id: string
      authorId: string
      authorName?: string
      body: string
      createdAt: number
      editedAt?: number
    }[]
    resolved: boolean
    resolvedBy?: string
    resolvedAt?: number
    anchor: {
      type: "text"
      from: string
      to: string
      quote?: string
    } | {
      type: "cell"
      sheetId: string
      rowId: string
      colId: string
      label?: string
    } | {
      type: "element"
      slideId: string
      elementId: string
    } | {
      type: "point"
      x: number
      y: number
    } | {
      type: "time"
      sequenceId: string
      t: number
      duration?: number
      x?: number
      y?: number
    } | {
      type: "file"
    }
    mentions?: string[]
    metadata?: {
      [key: string]: unknown
    }
  }
}
DELETE/v1/me/office/files/:fileId/threads/:threadId

Deletes a thread. Its author, or an editor of the file.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

  • threadId

    Conversation id (thr_…), or in Mirage a thread id (mth_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/me/office/files/{fileId}/threads/{threadId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

PATCH/v1/me/office/files/:fileId/threads/:threadId/comments/:commentId

Edits your own comment (body).

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

  • threadId

    Conversation id (thr_…), or in Mirage a thread id (mth_…).

  • commentId

    Comment id (icm_…).

Request body

  • bodystringrequired

    1–8,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X PATCH 'https://api.cactive.com.au/v1/me/office/files/{fileId}/threads/{threadId}/comments/{commentId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "body": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  thread: null | {
    id: string
    createdAt: number
    updatedAt: number
    comments: {
      id: string
      authorId: string
      authorName?: string
      body: string
      createdAt: number
      editedAt?: number
    }[]
    resolved: boolean
    resolvedBy?: string
    resolvedAt?: number
    anchor: {
      type: "text"
      from: string
      to: string
      quote?: string
    } | {
      type: "cell"
      sheetId: string
      rowId: string
      colId: string
      label?: string
    } | {
      type: "element"
      slideId: string
      elementId: string
    } | {
      type: "point"
      x: number
      y: number
    } | {
      type: "time"
      sequenceId: string
      t: number
      duration?: number
      x?: number
      y?: number
    } | {
      type: "file"
    }
    mentions?: string[]
    metadata?: {
      [key: string]: unknown
    }
  }
}
DELETE/v1/me/office/files/:fileId/threads/:threadId/comments/:commentId

Deletes a comment: your own, or any as an editor of the file.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

  • threadId

    Conversation id (thr_…), or in Mirage a thread id (mth_…).

  • commentId

    Comment id (icm_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/me/office/files/{fileId}/threads/{threadId}/comments/{commentId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  thread: null | {
    id: string
    createdAt: number
    updatedAt: number
    comments: {
      id: string
      authorId: string
      authorName?: string
      body: string
      createdAt: number
      editedAt?: number
    }[]
    resolved: boolean
    resolvedBy?: string
    resolvedAt?: number
    anchor: {
      type: "text"
      from: string
      to: string
      quote?: string
    } | {
      type: "cell"
      sheetId: string
      rowId: string
      colId: string
      label?: string
    } | {
      type: "element"
      slideId: string
      elementId: string
    } | {
      type: "point"
      x: number
      y: number
    } | {
      type: "time"
      sequenceId: string
      t: number
      duration?: number
      x?: number
      y?: number
    } | {
      type: "file"
    }
    mentions?: string[]
    metadata?: {
      [key: string]: unknown
    }
  }
}
POST/v1/me/office/files/:fileId/mentions

People @mentioned who can't open the file yet (the commenter is asked to share first).

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Request body

  • userIdsstring[]required

    Up to 50 items. Each up to 64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/files/{fileId}/mentions' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "userIds": [
      "example"
    ]
  }'
Send it from this page with your session or a key.

Response 200

{
  withoutAccess: string[]
}
GET/v1/me/office/files/:fileId/lock

Editing locks (Studio: one editor at a time; renew every minute).

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/office/files/{fileId}/lock' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  lock: {
    lockedBy?: string
    lockedName?: string
    lockUntil?: number
    mine: boolean
  }
}
POST/v1/me/office/files/:fileId/lock

Takes or renews the editing lock for one-at-a-time editing (renew every minute). 423 with who has it when someone else does.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/files/{fileId}/lock' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  lock: {
    lockedBy?: string
    lockedName?: string
    lockUntil?: number
    mine: boolean
  }
}
DELETE/v1/me/office/files/:fileId/lock

Gives up the editing lock.

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/me/office/files/{fileId}/lock' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

GET/v1/me/office/templates

The template gallery for kind: Blank, the organization's own templates you can read, then the built-ins.

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

Query parameters

  • kind"document" | "spreadsheet" | "presentation" | "video"

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/office/templates' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  templates: {
    templateId: string
    kind: "video" | "document" | "spreadsheet" | "presentation"
    name: string
    category?: string
    fileId?: string
    builtIn: boolean
  }[]
}
POST/v1/me/office/templates

Makes a file (fileId) one of the organization's templates, with an optional name and category. Editors of the file; not in personal spaces.

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

Request body

  • fileIdstringrequired

    Matches ^fil_[0-9a-z]{6,40}$.

  • namestring

    Up to 120 characters.

  • categorystring

    Up to 60 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/templates' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "fileId": "<fileId>"
  }'
Send it from this page with your session or a key.

Response 201

{
  template: {
    templateId: string
    fileId: string
    kind: "video" | "document" | "spreadsheet" | "presentation"
    name: string
    category?: string
    builtIn: false
  }
}
DELETE/v1/me/office/templates/:fileId

Takes a file off the organization's templates (the file stays).

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

Path parameters

  • fileId

    File id, as returned when the upload was created.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X DELETE 'https://api.cactive.com.au/v1/me/office/templates/{fileId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

POST/v1/me/office/imports

Opens a Word, Excel, PowerPoint, OpenDocument, CSV or Markdown file as a native one beside it (a job).

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

Request body

  • itemIdstringrequired

    3–64 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/imports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "itemId": "<itemId>"
  }'
Send it from this page with your session or a key.

Response 202

{
  job: {
    jobId: string
    type: "import" | "export" | "render"
    status: "queued" | "done" | "failed" | "running"
    result?: {
      [key: string]: unknown
    }
    error?: string
  }
}
POST/v1/me/office/exports

Downloads a file in another format (a job; ask GET /jobs/:jobId until it's done, then follow result.url).

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

Request body

  • fileIdstringrequired

    Matches ^fil_[0-9a-z]{6,40}$.

  • formatstringrequired

    Up to 10 characters.

  • versionIdstring

    Up to 64 characters.

  • sheetIdstring

    Up to 40 characters.

  • slideIdstring

    Up to 40 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/exports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "fileId": "<fileId>",
    "format": "example"
  }'
Send it from this page with your session or a key.

Response 202

{
  job: {
    jobId: string
    type: "import" | "export" | "render"
    status: "queued" | "done" | "failed" | "running"
    result?: {
      [key: string]: unknown
    }
    error?: string
  }
}
GET/v1/me/office/jobs/:jobId

An import or export job: status (queued, running, done, failed) and, when done, the new file or a download link.

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

Path parameters

  • jobId

    Job id: an agent job (job_…), under pipelines a pipeline job (pjb_…), or under crm an import or export (cjb_…); under marketing a list import (mkj_…).

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/office/jobs/{jobId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  job: {
    jobId: string
    type: "import" | "export" | "render"
    status: "queued" | "done" | "failed" | "running"
    result?: {
      [key: string]: unknown
    }
    error?: string
  }
}
GET/v1/me/office/recent

The person's files of a kind: recently opened first (view: recent, shared, starred or all).

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

Query parameters

  • kind"document" | "spreadsheet" | "presentation" | "video"required
  • view"recent" | "shared" | "starred" | "all"

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl 'https://api.cactive.com.au/v1/me/office/recent?kind=document' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  items: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "other" | "folder" | "video" | "archive" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image"
    mime?: string
    size: number
    versions: number
    versionId?: string
    checksum?: string
    children?: number
    description?: string
    createdBy: string
    createdAt: number
    modifiedBy: string
    modifiedAt: number
    ownerId?: string
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    starred: boolean
    shared: boolean
    trashedAt?: number
    trashedBy?: string
    thumbnailUrl?: string
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    stripMetadata: boolean
    spaceId: string
    contentMatch?: string
  }[]
}
POST/v1/me/office/assist

Writing, formula and slide help for the file's editor (a model call; counted per day).

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

Request body

  • fileIdstringrequired

    Matches ^fil_[0-9a-z]{6,40}$.

  • taskstringrequired

    Up to 40 characters.

  • inputstringrequired

    1–20,000 characters.

  • contextstring

    Up to 20,000 characters.

Errors

  • 403Personal files are only for the person, signed in.
  • 403This key has no person behind it, so it can't open Drive files.
  • 403The person who made this key isn't in the organization any more.
curl -X POST 'https://api.cactive.com.au/v1/me/office/assist' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "fileId": "<fileId>",
    "task": "example",
    "input": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  model: string
  data?: {
    [key: string]: unknown
  }
  task: string
  text: string
}
GET/v1/office/config

Limits for Documents, Sheets, Slides and Studio, and the download formats each kind offers now.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key
curl 'https://api.cactive.com.au/v1/office/config' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  limits: {
    "office.fileMb": number
    "office.sheetCells": number
    "office.sheets": number
    "office.chartsPerWorkbook": number
    "office.pivotsPerWorkbook": number
    "office.slides": number
    "office.mediaMb": number
    "office.importMb": number
    "office.exportsPerHour": number
    "office.assistPerDay": number
    "office.threadsPerFile": number
    "studio.maxPixels": number
    "studio.maxLayers": number
    "studio.psdMb": number
    "studio.historyMb": number
  }
  fonts: {
    family: string
    category: "serif" | "mono" | "display" | "sans"
  }[]
  fontsUrl: null | string
  catalog: {
    id: "office.fileMb" | "office.sheetCells" | "office.sheets" | "office.chartsPerWorkbook" | "office.pivotsPerWorkbook" | "office.slides" | "office.mediaMb" | "office.importMb" | "office.exportsPerHour" | "office.assistPerDay" | "office.threadsPerFile" | "studio.maxPixels" | "studio.maxLayers" | "studio.psdMb" | "studio.historyMb"
    label: "Largest file (MB of editing state)" | "Cells per workbook" | "Sheets per workbook" | "Charts per workbook" | "Pivot tables per workbook" | "Slides per presentation" | "Largest picture (MB)" | "Largest file to import (MB)" | "Downloads as other formats per person per hour" | "Writing and formula help per person per day" | "Comment threads per file" | "Largest canvas (pixels)" | "Layers per image" | "Largest Photoshop file (MB)" | "Undo history (MB)"
  }[]
  exports: {
    [key: string]: {
      format: "pdf" | "csv" | "png" | "txt" | "docx" | "odt" | "md" | "xlsx" | "ods" | "tsv" | "pptx" | "odp"
      label: string
      available: boolean
    }[]
  }
  imports: {
    [key: string]: string[]
  }
}