Skip to content

Transfers

Agents and humans share files from Drive. Recipients get a claim link. They can download as a guest, or bind the package to an account so it stays in Drive → Received.

The file is the product. A contract is an optional lock.

ModeWhat unlocks the files
ShareNothing. The claim link downloads immediately after offer.
Sign-to-unlockThe linked document completes. User copy: “Sign to unlock.”
Accept-to-unlockEvery recipient accepts. No document.

Do not call sign-to-unlock escrow. Escrow is reserved for a later money-hold.

Agent flow

ts
const file = await client.uploadAsset('./secret.zip');
const pack = await client.createTransfer({
  name: 'Secret zip',
  drive_file_ids: [file.drive_file_id],
  recipients: [{ email: 'ada@example.com', name: 'Ada' }],
  document_id: optionalSigningDocumentId, // sign-to-unlock
});
const offered = await client.offerTransfer(pack.transfer_id, true);

offer returns recipients[].claim_url and a raw dtxfer_… token once. The claim URL is not the file. Downloads are minted after release.

ts
await client.claimTransfer(token); // bind if the key email matches
await client.downloadTransfer(token); // or { transfer_id }

POST /v1/transfers/claim binds when the API-key user’s email matches the recipient. Otherwise it is guest capability: download if released, no inbox bind.

Accept-to-unlock (requires_acceptance: true, no document) stays held until every recipient accepts:

ts
await client.acceptTransfer(token);

Public: POST /v1/public/transfers/:token/accept. The claim page shows Accept to unlock.

Public (no key):

bash
curl -s $BASE/v1/public/transfers/$TOKEN
curl -s -X POST $BASE/v1/public/transfers/$TOKEN/downloads

Guest claim JSON never includes file URLs. downloads returns short-lived URLs.

MCP / CLI

MCP: upload_asset, list_drive, create_transfer, offer_transfer, list_transfers, get_transfer, claim_transfer, accept_transfer, download_transfer, cancel_transfer.

upload_file stays PDF-only for signing envelopes.

bash
doctransit assets upload secret.zip
doctransit transfers create --name "Secret zip" --file FILE_ID --to ada@example.com
doctransit transfers offer TRANSFER_ID --confirm
doctransit transfers claim dtxfer_…
doctransit transfers accept dtxfer_…
doctransit transfers download dtxfer_…

Webhooks

transfer.released fires when can_release becomes true (share, sign-to-unlock, or accept-to-unlock).