Drive API

Live

Tenant-keyed files for businesses. Upload through Drive, store a drive_file_id on a Chat message, play the bytes as a file (Range, HTML5 <video>). Bolrach Stream is not on this path. The signed-in product is workspace.bolrach.io/drive. This documentation lives at docs.bolrach.dev.

Base URL https://api.bolrach.io/drive/v1Auth Bearer sk_live_… or bt_live_…App workspace.bolrach.io/driveSpec openapi.json

Hosts

  • https://api.bolrach.io/drive/v1 — public API
  • https://workspace.bolrach.io/drive — signed-in Drive
  • https://drive.bolrach.io — share and media origin (apex sends you into Workspace Drive)
  • https://docs.bolrach.dev/drive — this page

Product hosts are .io. Developer docs stay on docs.bolrach.dev. There is no product Drive on *.bolrach.tech.

Upload

POST /drive/v1/files/initiate

Body: name, mime, size. Returns a presigned PUT (or multipart parts above 32 MiB). PUT the bytes, then complete. A file is ready only after storage confirms the object exists.

curl -X POST "https://api.bolrach.io/drive/v1/files/initiate" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "content-type: application/json" \
  -d '{"name":"clip.mp4","mime":"video/mp4","size":1234567}'
POST /drive/v1/files/{id}/complete

HEAD against storage. Returns metadata plus a playback url. stream is always false.

curl -X POST "https://api.bolrach.io/drive/v1/files/FILE_ID/complete" \
  -H "Authorization: Bearer sk_live_your_key"

Playback

GET /drive/v1/files/{id} returns a short-lived HMAC media URL under /drive/v1/media/…. That URL honours Range so a browser can seek a video. Bytes never go through Bolrach Stream unless you later publish an asset on purpose.

curl -H "Range: bytes=0-1023" \
  "https://api.bolrach.io/drive/v1/media/TOKEN/clip.mp4"

Attach in Chat

Chat does not accept raw file URLs. Post an attachment object with drive_file_id using the same Chat key that uploaded the file. See Chat API.

curl -X POST "https://api.bolrach.io/chat/v1/channels/CHANNEL_ID/messages" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "content-type: application/json" \
  -d '{"user_ref":"u1","body":"","attachments":[{"drive_file_id":"FILE_ID"}]}'

Not Stream

Stream is the media-asset plane (encode, ABR, live, watch pages). A clip in a chat thread is a Drive file. Optional later: an explicit “publish this file to Stream”. That is not how upload works.

Changelog

DateChange
2026-08-22Public /drive/v1 live. Signed-in Drive is workspace.bolrach.io/drive. Docs on docs.bolrach.dev/drive.