API reference

Drive

Files and folders in organizations and personal spaces: drives, uploads, versions, sharing, links, trash, search and ZIP downloads.

See Drive. Every route is under /v1/orgs/:orgId/drive (an organization's space) and /v1/me/drive (your personal space: signed-in people only, never keys). Public links are under /v1/hooks/drive without authentication.

Uploads: POST uploads answers the part size and links for the first parts; PUT each part's bytes to its link (any order, retried alone on failure), ask POST uploads/:uploadId/parts for more links, then POST uploads/:uploadId/complete. GET uploads/:uploadId lists the parts already stored, to resume.

Changes need drive:write as well as the access the item allows.

What a public link opens (name, type, size, photo details without location) or needsPassword. No authentication. 404 for links that were turned off, replaced, expired or trashed.

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

{
  needsPassword: true
  name?: undefined
  item?: undefined
  expiresAt?: undefined
} | {
  needsPassword: false
  item: {
    itemId: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    mime?: string
    size: number
    modifiedAt: number
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    preview: null | "text" | "audio" | "pdf" | "image" | "video"
  }
  expiresAt?: number
  name?: undefined
}

POST /v1/hooks/drive/links/:token/unlock

Checks a link's password and answers a grant for 12 hours, sent as x-si-link-grant with the link's other calls. 10 wrong passwords per link lock it for 15 minutes.

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.

Request body

FieldTypeRequiredNotes
passwordstringYes1–200 characters

Response 200

{
  grant: string
  expiresAt: number
}

A folder's contents through its public link (folderId for folders inside it), with the path from the shared folder.

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.
Query parameterTypeRequiredNotes
folderIdstringNoup to 64 characters

Response 200

{
  folder: {
    itemId: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    mime?: string
    size: number
    modifiedAt: number
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    preview: null | "text" | "audio" | "pdf" | "image" | "video"
  }
  path: {
    itemId: string
    name: string
  }[]
  items: {
    itemId: string
    kind: "file" | "folder"
    name: string
    type: "text" | "code" | "archive" | "folder" | "audio" | "document" | "spreadsheet" | "presentation" | "pdf" | "image" | "video" | "other"
    mime?: string
    size: number
    modifiedAt: number
    media?: {
      width?: number
      height?: number
      takenAt?: number
      make?: string
      model?: string
      lat?: number
      lon?: number
      altitude?: number
      orientation?: number
    }
    preview: null | "text" | "audio" | "pdf" | "image" | "video"
  }[]
}

A one-hour link to a file through its public link (itemId inside a shared folder; inline=1 to show it). Photos always come without location and camera details.

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.
Query parameterTypeRequiredNotes
itemIdstringNoup to 64 characters
inline"0" | "1"No

Response 200

{
  url: string
  name: string
  mime: string
  size?: number
  inline: boolean
  expiresIn: number
  cleaned: boolean
}

POST /v1/hooks/drive/links/:token/archives

Starts a ZIP of the shared folder (or itemIds inside it); photos are cleaned of location details.

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.

Request body

FieldTypeRequiredNotes
itemIdsstring[]Noup to 500 items; each up to 64 characters

Response 202

{
  archive: {
    archiveId: string
    status: "queued" | "building" | "ready" | "failed"
    name: string
    files: number
    bytes: number
    url?: string
    error?: string
  }
}

A ZIP's status through its public link, with a download link when ready.

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.
:archiveIdZIP download id (zip_…).

Response 200

{
  archive: {
    archiveId: string
    status: "queued" | "building" | "ready" | "failed"
    name: string
    files: number
    bytes: number
    url?: string
    error?: string
  }
}

GET /v1/orgs/:orgId/drive/drives

My Drive, the shared drives the caller belongs to (every one, to manage, for org admins) and storage use.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Response 200

{
  usage: {
    bytes: number
    files: number
    limit: number
  }
  personal: boolean
  myDrive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }
  sharedDrives: {
    member: boolean
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: 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/drive/drives

Creates a shared drive; the caller becomes its manager. Not in personal spaces; not for viewers.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
namestringYes1–255 characters
descriptionstringNoup to 500 characters

Response 201

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: 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/drive/drives/:driveId

A drive with its members (shared drives) and whether the caller can manage them.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:driveIdDrive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

Response 200

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }
  members: {
    principalId: string
    type: "user" | "team"
    role: "viewer" | "commenter" | "editor" | "manager"
    addedBy: string
    addedAt: number
  }[]
  canManage: 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/drive/drives/:driveId

Renames a shared drive or changes its description (managers, and org owners and admins).

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

Path parameterDescription
:orgIdOrganization id (org_…).
:driveIdDrive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

Request body

FieldTypeRequiredNotes
namestringNo1–255 characters
descriptionstringNoup to 500 characters; can be null

Response 200

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: 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.

DELETE /v1/orgs/:orgId/drive/drives/:driveId

Deletes an empty shared drive (its trash too must be empty).

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

Path parameterDescription
:orgIdOrganization id (org_…).
:driveIdDrive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

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.

PUT /v1/orgs/:orgId/drive/drives/:driveId/members/:principalId

Adds a person or team to a shared drive, or changes their role (viewer, commenter, editor, manager). A drive always keeps a manager who is a person.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:driveIdDrive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.
:principalIdA person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

Request body

FieldTypeRequiredNotes
role"viewer" | "commenter" | "editor" | "manager"Yes

Response 200

{
  ok: true
}

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/drive/drives/:driveId/members/:principalId

Removes a member (anyone may remove themselves).

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

Path parameterDescription
:orgIdOrganization id (org_…).
:driveIdDrive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.
:principalIdA person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

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/drive/usage

Storage the space uses (every version, the trash included) and its limit, in bytes.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Response 200

{
  usage: {
    bytes: number
    files: number
    limit: 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/drive/people

A person to share with, by exact email address: an org member here, any account for personal files.

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

Path parameterDescription
:orgIdOrganization id (org_…).
Query parameterTypeRequiredNotes
emailstringYesup to 320 characters; email address

Response 200

{
  person: {
    userId: string
    name?: string
    email?: 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/drive/log

Personal spaces: the owner's log of every change and access (who opened, downloaded or listed what, links included).

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

Path parameterDescription
:orgIdOrganization id (org_…).
Query parameterTypeRequiredNotes
cursorstringNoup to 2,000 characters

Response 200

{
  events: {
    activityId: string
    action: string
    actorId: string
    actorLabel?: string
    at: number
    detail: {
      [key: string]: unknown
    }
  }[]
  cursor?: 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.
404Org activity is in the audit log.

GET /v1/orgs/:orgId/drive/items/:itemId

A file or folder with its path (from the highest folder you can open), your role and what it allows, its shares (for editors) and its link setting. Photo details lose location and camera for people who only view, when the owner removes them.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

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

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/drive/items/:itemId

Renames an item (names are unique per folder, ignoring case) or sets its description. Editors.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

FieldTypeRequiredNotes
namestringNo1–255 characters
descriptionstringNoup to 2,000 characters; can be null

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

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/drive/items/:itemId/children

A folder's contents, folders first, sorted by name, modified or size (order), in pages of up to 1,000 (cursor).

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
Query parameterTypeRequiredNotes
sort"name" | "modified" | "size"No
order"asc" | "desc"No
cursorstringNoup to 200 characters
limitintegerNo1–1000; coerced from a string

Response 200

{
  folder: {
    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
  }
  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
  }[]
  total: number
  cursor?: 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/drive/items/:itemId/file

A one-hour link to the file's bytes (inline=1 to show it in the browser; versionId for an earlier version, editors only).

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
Query parameterTypeRequiredNotes
inline"0" | "1"No
versionIdstringNoup to 64 characters

Response 200

{
  url: string
  name: string
  mime: string
  size?: number
  inline: boolean
  expiresIn: number
  cleaned: 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/drive/items/:itemId/versions

A file's versions, newest first, with who uploaded each; canManage for editors.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

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
}

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/drive/items/:itemId/versions/:versionId/restore

Makes an earlier version current again as a new version (a copy in the bucket; counts against storage). Editors.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
: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.

DELETE /v1/orgs/:orgId/drive/items/:itemId/versions/:versionId

Deletes an earlier version (never the current one). Editors.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
: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 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/drive/items/:itemId/activity

What happened to an item (and, for folders, to what's in them), newest first, a year back.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
Query parameterTypeRequiredNotes
cursorstringNoup to 2,000 characters

Response 200

{
  events: {
    activityId: string
    action: string
    actorId: string
    actorLabel?: string
    at: number
    detail: {
      [key: string]: unknown
    }
  }[]
  cursor?: 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/drive/items/:itemId/comments

Comments on a file or folder, oldest first; canComment for commenters and editors.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Response 200

{
  comments: {
    commentId: string
    authorId: string
    authorLabel?: string
    body: string
    createdAt: number
    canDelete: boolean
    anchor?: {
      x?: number
      y?: number
      t?: number
    }
  }[]
  canComment: 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/drive/items/:itemId/comments

Adds a comment (up to 4,000 characters). Commenters and editors.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

FieldTypeRequiredNotes
bodystringYes1–4,000 characters
anchorobjectNo
anchor.xnumberNo-100000–100000
anchor.ynumberNo-100000–100000
anchor.tnumberNo0–1000000

Response 201

{
  comment: {
    anchor?: {
      x?: number
      y?: number
      t?: number
    }
    commentId: string
    authorId: string
    authorLabel?: string
    body: string
    createdAt: number
    canDelete: true
  }
}

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/drive/items/:itemId/comments/:commentId

Deletes a comment: its author, or an editor.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
:commentIdComment id (icm_…).

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.

PUT /v1/orgs/:orgId/drive/items/:itemId/shares/:principalId

Shares an item (and everything in it) with a person or team as viewer, commenter or editor. Org spaces: members and teams of the org; personal spaces: any person, no teams. Editors; at most 100 per item.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
:principalIdA person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

Request body

FieldTypeRequiredNotes
role"viewer" | "commenter" | "editor"Yes

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

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/drive/items/:itemId/shares/:principalId

Removes someone's access given on this item (inherited access stays). Anyone may remove their own.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
:principalIdA person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

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.

Link sharing and photo details: scope restricted, org or anyone; password null removes it; rotate makes a new link.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

FieldTypeRequiredNotes
scope"restricted" | "org" | "anyone"Yes
role"viewer" | "commenter" | "editor"No
expiresAtintegerNo> 0; can be null
passwordstringNo4–200 characters; can be null
stripMetadatabooleanNo
rotatebooleanNo

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

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/drive/items/:itemId/transfer

Gives a My Drive item (org spaces) to another member: it moves to the top of their My Drive and you keep editor access. Owners.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

FieldTypeRequiredNotes
userIdstringYes5–64 characters

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

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/drive/folders

Creates a folder (onConflict: fail, the default, or rename for a numbered name). Editors of the parent.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
parentIdstringYes3–64 characters
namestringYes1–255 characters
onConflict"rename" | "fail"No

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

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/drive/folders/paths

Folder uploads: makes each relative path's folders (a, a/b) under parentId, reusing existing ones.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
parentIdstringYes3–64 characters
pathsstring[]Yes1–500 items; each 1–4,000 characters

Response 200

{
  folders: {
    [key: string]: string
  }
  created: 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/drive/items/move

Moves items into a folder (up to 500). Between drives (everything inside goes too, at most 2,000 items) only for My Drive's owner or the source drive's managers.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters
parentIdstringYes3–64 characters

Response 200

{
  moved: {
    itemId: string
    name: string
    from: string
  }[]
  to: {
    itemId: string
    name: 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/drive/items/copy

Copies files (not folders) into a folder, Copy of … next to the original by default (server-side, up to 20 GB each; counts against storage).

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters
parentIdstringNo3–64 characters

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.

POST /v1/orgs/:orgId/drive/items/trash

Moves items (with everything in them) to their drive's trash; deleted forever after 30 days. Editors.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters

Response 200

{
  items: {
    itemId: string
    name: string
    kind: "file" | "folder"
  }[]
}

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/drive/items/restore

Puts trashed items back where they were (else at the top of their drive), with a numbered name if the name was taken meanwhile.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters

Response 200

{
  items: {
    itemId: string
    name: string
    parentId: 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/drive/items/delete

Deletes trashed items forever (owner or managers). Large folders finish in the background (done: false).

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters

Response 200

{
  deleted: {
    itemId: string
    name: string
  }[]
  done: 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/drive/items/star

Stars or unstars items for the caller (starred).

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters
starredbooleanYes

Response 200

{
  itemIds: string[]
  starred: 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/drive/trash

A drive's trash (My Drive by default, or driveId): items trashed there, newest first, with canEmpty for its owner or managers.

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

Path parameterDescription
:orgIdOrganization id (org_…).
Query parameterTypeRequiredNotes
driveIdstringNoup to 64 characters

Response 200

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
  }
  canEmpty: boolean
  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
  }[]
  retentionDays: 30
}

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/drive/trash/empty

Deletes everything in a drive's trash forever (My Drive by default). Owner or managers.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
driveIdstringNoup to 64 characters

Response 200

{
  deleted: number
  done: 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/drive/recent

Files you opened or changed in the last 60 days, newest first.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Response 200

{
  items: {
    at: number
    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.

GET /v1/orgs/:orgId/drive/starred

Your starred items you can still open.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Response 200

{
  items: {
    at: number
    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.

GET /v1/orgs/:orgId/drive/shared

Items shared with you (or your teams), newest first, outside your own My Drive. Personal context: personal files people shared with you.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Response 200

{
  items: {
    sharedAt: number
    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.

Items you can open whose names contain every word of q, optionally by type, owner (me, others or a person's id), modifiedAfter/modifiedBefore (ms) or driveId. Up to 50,000 items are searched; truncated says when more weren't.

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

Path parameterDescription
:orgIdOrganization id (org_…).
Query parameterTypeRequiredNotes
qstringNoup to 200 characters
typestringNoup to 20 characters
ownerstringNoup to 64 characters
modifiedAfterintegerNocoerced from a string
modifiedBeforeintegerNocoerced from a string
driveIdstringNoup to 64 characters
limitintegerNo1–200; coerced from a string

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
  }[]
  total: number
  truncated: 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/drive/uploads

Starts an upload: answers the part size and links for the first parts (PUT each part, then complete).

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
parentIdstringNo3–64 characters
itemIdstringNo3–64 characters
namestringYes1–255 characters
sizeintegerYes≥ 0
mimestringNoup to 200 characters
onConflict"version" | "rename" | "fail"No

Response 201

{
  uploadId: string
  itemId: string
  partSize: number
  partCount: number
  urls: {
    [key: number]: string
  }
  contentType: string
  name: string
  newVersion: 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/drive/uploads/:uploadId/parts

Links (an hour each) for more parts of an upload, up to 100 at a time.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:uploadIdUpload id (dup_…), from starting the upload.

Request body

FieldTypeRequiredNotes
partNumbersinteger[]Yes1–100 items; each 1–10000

Response 200

{
  urls: {
    [key: number]: string
  }
  expiresIn: 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/drive/uploads/:uploadId

Where an upload stands, with the parts already stored, to resume it.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:uploadIdUpload id (dup_…), from starting the upload.

Response 200

{
  uploadId: string
  itemId: string
  name: string
  size: number
  partSize: number
  partCount: number
  parts: {
    partNumber: number
    etag: string
    size?: number
  }[]
  expiresAt: 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/drive/uploads/:uploadId/complete

Finishes an upload once every part has arrived: checks the size, counts it against storage (413 when it doesn't fit) and records the file or its new version.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:uploadIdUpload id (dup_…), from starting the upload.

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
  }
  newVersion: 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/drive/uploads/:uploadId

Cancels an upload and discards its parts.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:uploadIdUpload id (dup_…), from starting the upload.

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/drive/archives

A ZIP of files and folders, made in the background; ask for it until status is ready, then download url.

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

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters

Response 202

{
  archive: {
    archiveId: string
    status: "queued" | "building" | "ready" | "failed"
    name: string
    files: number
    bytes: number
    url?: string
    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/drive/archives/:archiveId

A ZIP's status (queued, building, ready, failed) and, when ready, a one-hour download link.

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

Path parameterDescription
:orgIdOrganization id (org_…).
:archiveIdZIP download id (zip_…).

Response 200

{
  archive: {
    archiveId: string
    status: "queued" | "building" | "ready" | "failed"
    name: string
    files: number
    bytes: number
    url?: string
    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/drive/drives

My Drive, the shared drives the caller belongs to (every one, to manage, for org admins) and storage use.

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

Response 200

{
  usage: {
    bytes: number
    files: number
    limit: number
  }
  personal: boolean
  myDrive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }
  sharedDrives: {
    member: boolean
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: 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/drive/drives

Creates a shared drive; the caller becomes its manager. Not in personal spaces; not for viewers.

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

Request body

FieldTypeRequiredNotes
namestringYes1–255 characters
descriptionstringNoup to 500 characters

Response 201

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: 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/drive/drives/:driveId

A drive with its members (shared drives) and whether the caller can manage them.

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

Path parameterDescription
:driveIdDrive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

Response 200

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: number
  }
  members: {
    principalId: string
    type: "user" | "team"
    role: "viewer" | "commenter" | "editor" | "manager"
    addedBy: string
    addedAt: number
  }[]
  canManage: 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/drive/drives/:driveId

Renames a shared drive or changes its description (managers, and org owners and admins).

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

Path parameterDescription
:driveIdDrive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

Request body

FieldTypeRequiredNotes
namestringNo1–255 characters
descriptionstringNoup to 500 characters; can be null

Response 200

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
    description?: string
    ownerId?: string
    bytes: number
    role: null | "owner" | "viewer" | "commenter" | "editor" | "manager"
    createdAt: 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.

DELETE /v1/me/drive/drives/:driveId

Deletes an empty shared drive (its trash too must be empty).

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

Path parameterDescription
:driveIdDrive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.

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.

PUT /v1/me/drive/drives/:driveId/members/:principalId

Adds a person or team to a shared drive, or changes their role (viewer, commenter, editor, manager). A drive always keeps a manager who is a person.

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

Path parameterDescription
:driveIdDrive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.
:principalIdA person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

Request body

FieldTypeRequiredNotes
role"viewer" | "commenter" | "editor" | "manager"Yes

Response 200

{
  ok: true
}

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/drive/drives/:driveId/members/:principalId

Removes a member (anyone may remove themselves).

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

Path parameterDescription
:driveIdDrive id (drv_…): a My Drive or a shared drive. A drive's id is also its top folder's item id.
:principalIdA person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

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/drive/usage

Storage the space uses (every version, the trash included) and its limit, in bytes.

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

Response 200

{
  usage: {
    bytes: number
    files: number
    limit: 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/drive/people

A person to share with, by exact email address: an org member here, any account for personal files.

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

Query parameterTypeRequiredNotes
emailstringYesup to 320 characters; email address

Response 200

{
  person: {
    userId: string
    name?: string
    email?: 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/drive/log

Personal spaces: the owner's log of every change and access (who opened, downloaded or listed what, links included).

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

Query parameterTypeRequiredNotes
cursorstringNoup to 2,000 characters

Response 200

{
  events: {
    activityId: string
    action: string
    actorId: string
    actorLabel?: string
    at: number
    detail: {
      [key: string]: unknown
    }
  }[]
  cursor?: 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.
404Org activity is in the audit log.

GET /v1/me/drive/items/:itemId

A file or folder with its path (from the highest folder you can open), your role and what it allows, its shares (for editors) and its link setting. Photo details lose location and camera for people who only view, when the owner removes them.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

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

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/drive/items/:itemId

Renames an item (names are unique per folder, ignoring case) or sets its description. Editors.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

FieldTypeRequiredNotes
namestringNo1–255 characters
descriptionstringNoup to 2,000 characters; can be null

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

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/drive/items/:itemId/children

A folder's contents, folders first, sorted by name, modified or size (order), in pages of up to 1,000 (cursor).

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
Query parameterTypeRequiredNotes
sort"name" | "modified" | "size"No
order"asc" | "desc"No
cursorstringNoup to 200 characters
limitintegerNo1–1000; coerced from a string

Response 200

{
  folder: {
    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
  }
  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
  }[]
  total: number
  cursor?: 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/drive/items/:itemId/file

A one-hour link to the file's bytes (inline=1 to show it in the browser; versionId for an earlier version, editors only).

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
Query parameterTypeRequiredNotes
inline"0" | "1"No
versionIdstringNoup to 64 characters

Response 200

{
  url: string
  name: string
  mime: string
  size?: number
  inline: boolean
  expiresIn: number
  cleaned: 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/drive/items/:itemId/versions

A file's versions, newest first, with who uploaded each; canManage for editors.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

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
}

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/drive/items/:itemId/versions/:versionId/restore

Makes an earlier version current again as a new version (a copy in the bucket; counts against storage). Editors.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
: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.

DELETE /v1/me/drive/items/:itemId/versions/:versionId

Deletes an earlier version (never the current one). Editors.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
: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 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/drive/items/:itemId/activity

What happened to an item (and, for folders, to what's in them), newest first, a year back.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
Query parameterTypeRequiredNotes
cursorstringNoup to 2,000 characters

Response 200

{
  events: {
    activityId: string
    action: string
    actorId: string
    actorLabel?: string
    at: number
    detail: {
      [key: string]: unknown
    }
  }[]
  cursor?: 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/drive/items/:itemId/comments

Comments on a file or folder, oldest first; canComment for commenters and editors.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Response 200

{
  comments: {
    commentId: string
    authorId: string
    authorLabel?: string
    body: string
    createdAt: number
    canDelete: boolean
    anchor?: {
      x?: number
      y?: number
      t?: number
    }
  }[]
  canComment: 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/drive/items/:itemId/comments

Adds a comment (up to 4,000 characters). Commenters and editors.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

FieldTypeRequiredNotes
bodystringYes1–4,000 characters
anchorobjectNo
anchor.xnumberNo-100000–100000
anchor.ynumberNo-100000–100000
anchor.tnumberNo0–1000000

Response 201

{
  comment: {
    anchor?: {
      x?: number
      y?: number
      t?: number
    }
    commentId: string
    authorId: string
    authorLabel?: string
    body: string
    createdAt: number
    canDelete: true
  }
}

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/drive/items/:itemId/comments/:commentId

Deletes a comment: its author, or an editor.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
:commentIdComment id (icm_…).

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.

PUT /v1/me/drive/items/:itemId/shares/:principalId

Shares an item (and everything in it) with a person or team as viewer, commenter or editor. Org spaces: members and teams of the org; personal spaces: any person, no teams. Editors; at most 100 per item.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
:principalIdA person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

Request body

FieldTypeRequiredNotes
role"viewer" | "commenter" | "editor"Yes

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

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/drive/items/:itemId/shares/:principalId

Removes someone's access given on this item (inherited access stays). Anyone may remove their own.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).
:principalIdA person (usr_…) or a group or team (team_…): the member or group a Tenant assignment or a Drive share is for.

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.

Link sharing and photo details: scope restricted, org or anyone; password null removes it; rotate makes a new link.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

FieldTypeRequiredNotes
scope"restricted" | "org" | "anyone"Yes
role"viewer" | "commenter" | "editor"No
expiresAtintegerNo> 0; can be null
passwordstringNo4–200 characters; can be null
stripMetadatabooleanNo
rotatebooleanNo

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

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/drive/items/:itemId/transfer

Gives a My Drive item (org spaces) to another member: it moves to the top of their My Drive and you keep editor access. Owners.

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

Path parameterDescription
:itemIdDrive file (fil_…) or folder (fld_…) id, or a drive id for its top folder; under me/food a shopping list item (fli_…) or something in the pantry (fpn_…).

Request body

FieldTypeRequiredNotes
userIdstringYes5–64 characters

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

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/drive/folders

Creates a folder (onConflict: fail, the default, or rename for a numbered name). Editors of the parent.

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

Request body

FieldTypeRequiredNotes
parentIdstringYes3–64 characters
namestringYes1–255 characters
onConflict"rename" | "fail"No

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

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/drive/folders/paths

Folder uploads: makes each relative path's folders (a, a/b) under parentId, reusing existing ones.

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

Request body

FieldTypeRequiredNotes
parentIdstringYes3–64 characters
pathsstring[]Yes1–500 items; each 1–4,000 characters

Response 200

{
  folders: {
    [key: string]: string
  }
  created: 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/drive/items/move

Moves items into a folder (up to 500). Between drives (everything inside goes too, at most 2,000 items) only for My Drive's owner or the source drive's managers.

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

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters
parentIdstringYes3–64 characters

Response 200

{
  moved: {
    itemId: string
    name: string
    from: string
  }[]
  to: {
    itemId: string
    name: 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/drive/items/copy

Copies files (not folders) into a folder, Copy of … next to the original by default (server-side, up to 20 GB each; counts against storage).

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

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters
parentIdstringNo3–64 characters

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.

POST /v1/me/drive/items/trash

Moves items (with everything in them) to their drive's trash; deleted forever after 30 days. Editors.

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

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters

Response 200

{
  items: {
    itemId: string
    name: string
    kind: "file" | "folder"
  }[]
}

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/drive/items/restore

Puts trashed items back where they were (else at the top of their drive), with a numbered name if the name was taken meanwhile.

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

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters

Response 200

{
  items: {
    itemId: string
    name: string
    parentId: 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/drive/items/delete

Deletes trashed items forever (owner or managers). Large folders finish in the background (done: false).

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

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters

Response 200

{
  deleted: {
    itemId: string
    name: string
  }[]
  done: 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/drive/items/star

Stars or unstars items for the caller (starred).

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

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters
starredbooleanYes

Response 200

{
  itemIds: string[]
  starred: 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/drive/trash

A drive's trash (My Drive by default, or driveId): items trashed there, newest first, with canEmpty for its owner or managers.

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

Query parameterTypeRequiredNotes
driveIdstringNoup to 64 characters

Response 200

{
  drive: {
    driveId: string
    kind: "user" | "shared"
    name: string
  }
  canEmpty: boolean
  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
  }[]
  retentionDays: 30
}

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/drive/trash/empty

Deletes everything in a drive's trash forever (My Drive by default). Owner or managers.

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

Request body

FieldTypeRequiredNotes
driveIdstringNoup to 64 characters

Response 200

{
  deleted: number
  done: 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/drive/recent

Files you opened or changed in the last 60 days, newest first.

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

Response 200

{
  items: {
    at: number
    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.

GET /v1/me/drive/starred

Your starred items you can still open.

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

Response 200

{
  items: {
    at: number
    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.

GET /v1/me/drive/shared

Items shared with you (or your teams), newest first, outside your own My Drive. Personal context: personal files people shared with you.

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

Response 200

{
  items: {
    sharedAt: number
    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.

Items you can open whose names contain every word of q, optionally by type, owner (me, others or a person's id), modifiedAfter/modifiedBefore (ms) or driveId. Up to 50,000 items are searched; truncated says when more weren't.

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

Query parameterTypeRequiredNotes
qstringNoup to 200 characters
typestringNoup to 20 characters
ownerstringNoup to 64 characters
modifiedAfterintegerNocoerced from a string
modifiedBeforeintegerNocoerced from a string
driveIdstringNoup to 64 characters
limitintegerNo1–200; coerced from a string

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
  }[]
  total: number
  truncated: 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/drive/uploads

Starts an upload: answers the part size and links for the first parts (PUT each part, then complete).

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

Request body

FieldTypeRequiredNotes
parentIdstringNo3–64 characters
itemIdstringNo3–64 characters
namestringYes1–255 characters
sizeintegerYes≥ 0
mimestringNoup to 200 characters
onConflict"version" | "rename" | "fail"No

Response 201

{
  uploadId: string
  itemId: string
  partSize: number
  partCount: number
  urls: {
    [key: number]: string
  }
  contentType: string
  name: string
  newVersion: 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/drive/uploads/:uploadId/parts

Links (an hour each) for more parts of an upload, up to 100 at a time.

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

Path parameterDescription
:uploadIdUpload id (dup_…), from starting the upload.

Request body

FieldTypeRequiredNotes
partNumbersinteger[]Yes1–100 items; each 1–10000

Response 200

{
  urls: {
    [key: number]: string
  }
  expiresIn: 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/drive/uploads/:uploadId

Where an upload stands, with the parts already stored, to resume it.

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

Path parameterDescription
:uploadIdUpload id (dup_…), from starting the upload.

Response 200

{
  uploadId: string
  itemId: string
  name: string
  size: number
  partSize: number
  partCount: number
  parts: {
    partNumber: number
    etag: string
    size?: number
  }[]
  expiresAt: 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/drive/uploads/:uploadId/complete

Finishes an upload once every part has arrived: checks the size, counts it against storage (413 when it doesn't fit) and records the file or its new version.

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

Path parameterDescription
:uploadIdUpload id (dup_…), from starting the upload.

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
  }
  newVersion: 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/drive/uploads/:uploadId

Cancels an upload and discards its parts.

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

Path parameterDescription
:uploadIdUpload id (dup_…), from starting the upload.

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/drive/archives

A ZIP of files and folders, made in the background; ask for it until status is ready, then download url.

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

Request body

FieldTypeRequiredNotes
itemIdsstring[]Yes1–500 items; each 3–64 characters

Response 202

{
  archive: {
    archiveId: string
    status: "queued" | "building" | "ready" | "failed"
    name: string
    files: number
    bytes: number
    url?: string
    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/drive/archives/:archiveId

A ZIP's status (queued, building, ready, failed) and, when ready, a one-hour download link.

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

Path parameterDescription
:archiveIdZIP download id (zip_…).

Response 200

{
  archive: {
    archiveId: string
    status: "queued" | "building" | "ready" | "failed"
    name: string
    files: number
    bytes: number
    url?: string
    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.