Skip to content
Navigation
View as Markdown

REST API

Base URL: https://app.thinkbench.com/api/v1

Authenticate with an API key in the x-api-key header — see Authentication.

Conventions

  • Requests and responses are JSON (content-type: application/json); timestamps are ISO 8601 strings.
  • Operations return whole canonical objects — a DriveItem is the same shape everywhere it appears — rather than per-endpoint field subsets.
  • Write operations with nothing to add return an empty 200 response.
  • Ids you don't have access to and ids that don't exist are indistinguishable 404s.

Errors

Failures return a non-2xx status with a JSON envelope:

{ "code": "UNAUTHORIZED", "message": "invalid API key" }

code is a stable machine-readable string; message is human-readable detail.

Operations

Operation Method Path Summary
documents.read GET /documents/{documentId} Read a ThinkBench document and return its current content as Markdown.
driveItems.sharedWithMe GET /drive-items/shared-with-me List items shared directly with the user via share grants.
driveItems.get GET /drive-items/{itemId} Read a drive item with its drive, children, visible ancestors, and shares.
driveItems.rename PATCH /drive-items/{itemId} Rename a drive item.
driveItems.move POST /drive-items/{itemId}/move Move an item to another folder or drive.
driveItems.createChild POST /drive-items/{itemId}/children Create a folder or document inside a folder.
driveItems.shareSuggestions GET /drive-items/{itemId}/share-suggestions Organization members who could be given access to this item.
driveItems.share POST /drive-items/{itemId}/access Grant a person access to an item by email.
driveItems.updateShare PATCH /drive-items/{itemId}/access/{email} Change an existing share grant's permission.
driveItems.removeShare DELETE /drive-items/{itemId}/access/{email} Revoke a share grant.
driveItems.setPublication PUT /drive-items/{itemId}/publication Publish or unpublish a document to the web.
driveItems.uploadImage POST /drive-items/{itemId}/images Upload an image used inside a document.
drives.list GET /drives List every drive the user can access, each with its items and members.
drives.create POST /drives Create a shared drive in the active organization.
drives.rename PATCH /drives/{driveId} Rename a drive.
drives.createItem POST /drives/{driveId}/items Create a folder or document at the drive's root.
drives.upsertMember PUT /drives/{driveId}/members/{userId} Add an organization member to a shared drive or change their role.
drives.removeMember DELETE /drives/{driveId}/members/{userId} Remove a member from a shared drive.