API reference

Documents, Sheets and Slides

Creating and co-editing documents, spreadsheets and presentations, their versions, comments, templates, imports, downloads and search.

See Documents, Sheets and Slides. Every route is under /v1/orgs/:orgId/office (an organization's files) and /v1/me/office (your personal space: signed-in people only, never keys). Public links and the print page's render tokens are under /v1/hooks/office without a session.

The files are Drive files: move, share, star, trash and delete them with Drive's API, which decides every access check here too. Reading needs drive:read; changes need drive:write as well as the access the file allows.

Editing: GET files/:fileId/collab answers the file's state (base64 Yjs: the latest version plus the edits after it), its epoch and seq, your rights, and a ticket for the co-editing socket. Edits go over the socket, or to POST files/:fileId/collab/updates when they're larger than 90 KB. When an answer says reset, the file was replaced (a restore or an upload): load the state again.

Imports and downloads in other formats are jobs: POST imports or POST exports answers a job; ask GET jobs/:jobId until it's done (a new file, or a download link good for a day) or failed.

A document, spreadsheet or presentation through its public link, for viewing: its name, kind and state (base64 Yjs). No authentication; password-protected links need their grant (x-si-link-grant).

Auth: none

Path parameterDescription
:tokenA 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>), 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.

Response 200

{
  item: {
    itemId: string
    name: string
    modifiedAt: number
  }
  kind: "document" | "spreadsheet" | "presentation" | "video"
  state: string
}

A picture in a file shared by a public link.

Auth: none

Path parameterDescription
:tokenA 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>), 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.
:mediaIdA 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.

Response 200

{
  url: string
  mime: string
}

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 parameterDescription
:tokenA 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>), 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.

Response 200

{
  fileId: string
  kind?: "document" | "spreadsheet" | "presentation" | "video"
  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 parameterDescription
:tokenA 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>), 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.
:mediaIdA 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.

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
kind"document" | "spreadsheet" | "presentation" | "video"Yes
parentIdstringNo3–64 characters
namestringNo1–255 characters
templateIdstringNo3–64 characters
localestringNoup to 20 characters
todaystringNomatches ^\d{4}-\d{2}-\d{2}$
meetingobjectNo
meeting.titlestringNoup to 200 characters
meeting.timestringNoup to 60 characters
meeting.guestsstring[]Noup to 50 items; each up to 120 characters

Response 201

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    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" | "anyone" | "restricted"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  kind: "document" | "spreadsheet" | "presentation" | "video"
  app: "video" | "documents" | "sheets" | "slides"
  path: string
  rights: {
    view: boolean
    comment: boolean
    edit: boolean
    share: boolean
    delete: boolean
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    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" | "anyone" | "restricted"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  kind: "document" | "spreadsheet" | "presentation" | "video"
  app: "video" | "documents" | "sheets" | "slides"
  path: string
  rights: {
    view: boolean
    comment: boolean
    edit: boolean
    share: boolean
    delete: boolean
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

Request body

FieldTypeRequiredNotes
namestringNo1–255 characters
parentIdstringNo3–64 characters
versionIdstringNoup to 64 characters
withProxiesbooleanNo

Response 201

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    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" | "anyone" | "restricted"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  kind: "document" | "spreadsheet" | "presentation" | "video"
  app: "video" | "documents" | "sheets" | "slides"
  path: string
  rights: {
    view: boolean
    comment: boolean
    edit: boolean
    share: boolean
    delete: boolean
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.
Query parameterTypeRequiredNotes
ticket"0" | "1"No
state"0" | "1"No
tabstringNoup to 64 characters
devicestringNoup to 60 characters

Response 200

{
  epoch: null | string
  seq: number
  state: null | string
  base: string | number
  canWrite: boolean
  canComment?: boolean
  socket: null | {
    url: string
    ticket: null | string
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

Response 200

undefined

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

Request body (up to 2,936,012.8 bytes)

FieldTypeRequiredNotes
epochstringYes1–64 characters
updatestringYesat least 1 character

Response 200

{
  seq: number
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.
Query parameterTypeRequiredNotes
epochstringYes1–64 characters
afterintegerYes≥ 0; coerced from a string

Response 200

{
  reset: true
} | {
  reset: false
  updates: {
    seq: number
    update: string
  }[]
  state?: null | string
  seq?: number
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

Request body

FieldTypeRequiredNotes
reason"interval" | "leave" | "named"Yes
namestringNoup to 200 characters

Response 200

{
  saved: boolean
  seq: number
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

Request body

FieldTypeRequiredNotes
namestringYes1–255 characters
sizeintegerYes≥ 1
mimestringYesup to 100 characters

Response 201

{
  mediaId: string
  url: string
  method: "PUT"
  expiresIn: number
  uploadId: string
  partSize: number
  partCount: number
  urls: {
    [key: number]: string
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.
:mediaIdA 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.

Response 200

{
  mediaId: string
  size: number
  mime: string
}

Errors

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

GET /v1/orgs/:orgId/office/files/:fileId/media/:mediaId

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.
:mediaIdA 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.

Response 200

{
  url: string
  mime: string
  size: number
  expiresIn: number
  canEdit: boolean
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

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
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.
:versionIdVersion 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_…).

Response 200

{
  versionId: string
  kind: "document" | "spreadsheet" | "presentation" | "video"
  state: null | string
  createdAt: number
  uploadedBy: string
  label?: string
  pinned: boolean
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.
:versionIdVersion 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

FieldTypeRequiredNotes
namestringNoup to 200 characters; can be null
pinnedbooleanNo

Response 200

{
  versionId: string
  label?: string
  pinned: boolean
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.
:versionIdVersion 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_…).

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    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
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

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
    }
  }[]
}

Errors

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

POST /v1/orgs/:orgId/office/files/:fileId/threads

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

Request body

FieldTypeRequiredNotes
anchorobject | object | object | object | object | objectYes
bodystringYes1–8,000 characters

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
    }
  }
}

Errors

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

POST /v1/orgs/:orgId/office/files/:fileId/threads/:threadId/comments

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.
:threadIdConversation id (thr_…), or in Mirage a thread id (mth_…).

Request body

FieldTypeRequiredNotes
bodystringYes1–8,000 characters

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
    }
  }
}

Errors

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

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

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.
:threadIdConversation id (thr_…), or in Mirage a thread id (mth_…).

Request body

FieldTypeRequiredNotes
resolvedbooleanYes

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
    }
  }
}

Errors

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

DELETE /v1/orgs/:orgId/office/files/:fileId/threads/:threadId

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.
:threadIdConversation id (thr_…), or in Mirage a thread id (mth_…).

Response 204 with no body.

Errors

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

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

Edits your own comment (body).

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.
:threadIdConversation id (thr_…), or in Mirage a thread id (mth_…).
:commentIdComment id (icm_…).

Request body

FieldTypeRequiredNotes
bodystringYes1–8,000 characters

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
    }
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.
:threadIdConversation id (thr_…), or in Mirage a thread id (mth_…).
:commentIdComment id (icm_…).

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
    }
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

Request body

FieldTypeRequiredNotes
userIdsstring[]Yesup to 50 items; each up to 64 characters

Response 200

{
  withoutAccess: string[]
}

Errors

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

GET /v1/orgs/:orgId/office/files/:fileId/lock

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

Response 200

{
  lock: {
    lockedBy?: string
    lockedName?: string
    lockUntil?: number
    mine: boolean
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

Response 200

{
  lock: {
    lockedBy?: string
    lockedName?: string
    lockUntil?: number
    mine: boolean
  }
}

Errors

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

DELETE /v1/orgs/:orgId/office/files/:fileId/lock

Gives up the editing lock.

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

Response 204 with no body.

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
Query parameterTypeRequiredNotes
kind"document" | "spreadsheet" | "presentation" | "video"No

Response 200

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

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
fileIdstringYesmatches ^fil_[0-9a-z]{6,40}$
namestringNoup to 120 characters
categorystringNoup to 60 characters

Response 201

{
  template: {
    templateId: string
    fileId: string
    kind: "document" | "spreadsheet" | "presentation" | "video"
    name: string
    category?: string
    builtIn: false
  }
}

Errors

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

DELETE /v1/orgs/:orgId/office/templates/:fileId

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:fileIdFile id, as returned when the upload was created.

Response 204 with no body.

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
itemIdstringYes3–64 characters

Response 202

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

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
fileIdstringYesmatches ^fil_[0-9a-z]{6,40}$
formatstringYesup to 10 characters
versionIdstringNoup to 64 characters
sheetIdstringNoup to 40 characters
slideIdstringNoup to 40 characters

Response 202

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

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
:jobIdJob 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_…).

Response 200

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

Errors

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

GET /v1/orgs/:orgId/office/recent

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
Query parameterTypeRequiredNotes
kind"document" | "spreadsheet" | "presentation" | "video"Yes
view"recent" | "shared" | "starred" | "all"No

Response 200

{
  items: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    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
  }[]
}

Errors

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

Files whose content holds every word of q (and that the person can open), with a snippet.

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).
Query parameterTypeRequiredNotes
qstringYes1–200 characters
kind"document" | "spreadsheet" | "presentation" | "video"No
limitintegerNo1–100; coerced from a string

Response 200

{
  results: {
    item: {
      itemId: string
      driveId: string
      parentId?: string
      kind: "file" | "folder"
      name: string
      type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
      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
    }
    kind: "document" | "spreadsheet" | "presentation" | "video"
    snippet: string
  }[]
}

Errors

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

POST /v1/orgs/:orgId/office/assist

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
fileIdstringYesmatches ^fil_[0-9a-z]{6,40}$
taskstringYesup to 40 characters
inputstringYes1–20,000 characters
contextstringNoup to 20,000 characters

Response 200

{
  model: string
  data?: {
    [key: string]: unknown
  }
  task: string
  text: string
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Request body

FieldTypeRequiredNotes
kind"document" | "spreadsheet" | "presentation" | "video"Yes
parentIdstringNo3–64 characters
namestringNo1–255 characters
templateIdstringNo3–64 characters
localestringNoup to 20 characters
todaystringNomatches ^\d{4}-\d{2}-\d{2}$
meetingobjectNo
meeting.titlestringNoup to 200 characters
meeting.timestringNoup to 60 characters
meeting.guestsstring[]Noup to 50 items; each up to 120 characters

Response 201

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    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" | "anyone" | "restricted"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  kind: "document" | "spreadsheet" | "presentation" | "video"
  app: "video" | "documents" | "sheets" | "slides"
  path: string
  rights: {
    view: boolean
    comment: boolean
    edit: boolean
    share: boolean
    delete: boolean
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    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" | "anyone" | "restricted"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  kind: "document" | "spreadsheet" | "presentation" | "video"
  app: "video" | "documents" | "sheets" | "slides"
  path: string
  rights: {
    view: boolean
    comment: boolean
    edit: boolean
    share: boolean
    delete: boolean
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

Request body

FieldTypeRequiredNotes
namestringNo1–255 characters
parentIdstringNo3–64 characters
versionIdstringNoup to 64 characters
withProxiesbooleanNo

Response 201

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    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" | "anyone" | "restricted"
      role: "viewer" | "commenter" | "editor"
      expiresAt?: number
      hasPassword: boolean
      url?: string
    }
    personal: boolean
  }
  kind: "document" | "spreadsheet" | "presentation" | "video"
  app: "video" | "documents" | "sheets" | "slides"
  path: string
  rights: {
    view: boolean
    comment: boolean
    edit: boolean
    share: boolean
    delete: boolean
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.
Query parameterTypeRequiredNotes
ticket"0" | "1"No
state"0" | "1"No
tabstringNoup to 64 characters
devicestringNoup to 60 characters

Response 200

{
  epoch: null | string
  seq: number
  state: null | string
  base: string | number
  canWrite: boolean
  canComment?: boolean
  socket: null | {
    url: string
    ticket: null | string
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

Response 200

undefined

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

Request body (up to 2,936,012.8 bytes)

FieldTypeRequiredNotes
epochstringYes1–64 characters
updatestringYesat least 1 character

Response 200

{
  seq: number
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.
Query parameterTypeRequiredNotes
epochstringYes1–64 characters
afterintegerYes≥ 0; coerced from a string

Response 200

{
  reset: true
} | {
  reset: false
  updates: {
    seq: number
    update: string
  }[]
  state?: null | string
  seq?: number
}

Errors

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

POST /v1/me/office/files/:fileId/checkpoint

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

Request body

FieldTypeRequiredNotes
reason"interval" | "leave" | "named"Yes
namestringNoup to 200 characters

Response 200

{
  saved: boolean
  seq: number
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

Request body

FieldTypeRequiredNotes
namestringYes1–255 characters
sizeintegerYes≥ 1
mimestringYesup to 100 characters

Response 201

{
  mediaId: string
  url: string
  method: "PUT"
  expiresIn: number
  uploadId: string
  partSize: number
  partCount: number
  urls: {
    [key: number]: string
  }
}

Errors

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

POST /v1/me/office/files/:fileId/media/:mediaId/complete

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.
:mediaIdA 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.

Response 200

{
  mediaId: string
  size: number
  mime: string
}

Errors

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

GET /v1/me/office/files/:fileId/media/:mediaId

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.
:mediaIdA 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.

Response 200

{
  url: string
  mime: string
  size: number
  expiresIn: number
  canEdit: boolean
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

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
}

Errors

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

GET /v1/me/office/files/:fileId/versions/:versionId/content

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.
:versionIdVersion 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_…).

Response 200

{
  versionId: string
  kind: "document" | "spreadsheet" | "presentation" | "video"
  state: null | string
  createdAt: number
  uploadedBy: string
  label?: string
  pinned: boolean
}

Errors

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

PATCH /v1/me/office/files/:fileId/versions/:versionId

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.
:versionIdVersion 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

FieldTypeRequiredNotes
namestringNoup to 200 characters; can be null
pinnedbooleanNo

Response 200

{
  versionId: string
  label?: string
  pinned: boolean
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.
:versionIdVersion 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_…).

Response 200

{
  item: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    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
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

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
    }
  }[]
}

Errors

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

POST /v1/me/office/files/:fileId/threads

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

Request body

FieldTypeRequiredNotes
anchorobject | object | object | object | object | objectYes
bodystringYes1–8,000 characters

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
    }
  }
}

Errors

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

POST /v1/me/office/files/:fileId/threads/:threadId/comments

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.
:threadIdConversation id (thr_…), or in Mirage a thread id (mth_…).

Request body

FieldTypeRequiredNotes
bodystringYes1–8,000 characters

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
    }
  }
}

Errors

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

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

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.
:threadIdConversation id (thr_…), or in Mirage a thread id (mth_…).

Request body

FieldTypeRequiredNotes
resolvedbooleanYes

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
    }
  }
}

Errors

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

DELETE /v1/me/office/files/:fileId/threads/:threadId

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.
:threadIdConversation id (thr_…), or in Mirage a thread id (mth_…).

Response 204 with no body.

Errors

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

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

Edits your own comment (body).

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.
:threadIdConversation id (thr_…), or in Mirage a thread id (mth_…).
:commentIdComment id (icm_…).

Request body

FieldTypeRequiredNotes
bodystringYes1–8,000 characters

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
    }
  }
}

Errors

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

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

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.
:threadIdConversation id (thr_…), or in Mirage a thread id (mth_…).
:commentIdComment id (icm_…).

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
    }
  }
}

Errors

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

POST /v1/me/office/files/:fileId/mentions

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

Request body

FieldTypeRequiredNotes
userIdsstring[]Yesup to 50 items; each up to 64 characters

Response 200

{
  withoutAccess: string[]
}

Errors

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

GET /v1/me/office/files/:fileId/lock

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

Response 200

{
  lock: {
    lockedBy?: string
    lockedName?: string
    lockUntil?: number
    mine: boolean
  }
}

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

Response 200

{
  lock: {
    lockedBy?: string
    lockedName?: string
    lockUntil?: number
    mine: boolean
  }
}

Errors

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

DELETE /v1/me/office/files/:fileId/lock

Gives up the editing lock.

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

Response 204 with no body.

Errors

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

GET /v1/me/office/templates

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

Auth: user access token or platform agent key · Scope: drive:read

Query parameterTypeRequiredNotes
kind"document" | "spreadsheet" | "presentation" | "video"No

Response 200

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

Errors

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

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: user access token or platform agent key · Scope: drive:read

Request body

FieldTypeRequiredNotes
fileIdstringYesmatches ^fil_[0-9a-z]{6,40}$
namestringNoup to 120 characters
categorystringNoup to 60 characters

Response 201

{
  template: {
    templateId: string
    fileId: string
    kind: "document" | "spreadsheet" | "presentation" | "video"
    name: string
    category?: string
    builtIn: false
  }
}

Errors

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

DELETE /v1/me/office/templates/:fileId

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

Auth: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:fileIdFile id, as returned when the upload was created.

Response 204 with no body.

Errors

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

POST /v1/me/office/imports

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

Auth: user access token or platform agent key · Scope: drive:read

Request body

FieldTypeRequiredNotes
itemIdstringYes3–64 characters

Response 202

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

Errors

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

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: user access token or platform agent key · Scope: drive:read

Request body

FieldTypeRequiredNotes
fileIdstringYesmatches ^fil_[0-9a-z]{6,40}$
formatstringYesup to 10 characters
versionIdstringNoup to 64 characters
sheetIdstringNoup to 40 characters
slideIdstringNoup to 40 characters

Response 202

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

Errors

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

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: user access token or platform agent key · Scope: drive:read

Path parameterDescription
:jobIdJob 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_…).

Response 200

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

Errors

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

GET /v1/me/office/recent

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

Auth: user access token or platform agent key · Scope: drive:read

Query parameterTypeRequiredNotes
kind"document" | "spreadsheet" | "presentation" | "video"Yes
view"recent" | "shared" | "starred" | "all"No

Response 200

{
  items: {
    itemId: string
    driveId: string
    parentId?: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    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
  }[]
}

Errors

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

Files whose content holds every word of q (and that the person can open), with a snippet.

Auth: user access token or platform agent key · Scope: drive:read

Query parameterTypeRequiredNotes
qstringYes1–200 characters
kind"document" | "spreadsheet" | "presentation" | "video"No
limitintegerNo1–100; coerced from a string

Response 200

{
  results: {
    item: {
      itemId: string
      driveId: string
      parentId?: string
      kind: "file" | "folder"
      name: string
      type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
      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
    }
    kind: "document" | "spreadsheet" | "presentation" | "video"
    snippet: string
  }[]
}

Errors

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

POST /v1/me/office/assist

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

Auth: user access token or platform agent key · Scope: drive:read

Request body

FieldTypeRequiredNotes
fileIdstringYesmatches ^fil_[0-9a-z]{6,40}$
taskstringYesup to 40 characters
inputstringYes1–20,000 characters
contextstringNoup to 20,000 characters

Response 200

{
  model: string
  data?: {
    [key: string]: unknown
  }
  task: string
  text: string
}

Errors

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

GET /v1/office/config

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

Auth: user access token or platform agent 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[]
  }
}