Viscollab API

Built for your stack.

A simple REST API. Upload, share, annotate, summarize.

01

Quick start

Get a key from your dashboard, then upload a document and read its annotations.

bash
# 1. Request an upload URL
curl -X POST https://viscollab.com/api/v1/uploads \
  -H "Authorization: Bearer vc_live_..." \
  -H "Content-Type: application/json" \
  -d '{"filename":"plan.pdf","mime":"application/pdf","sizeBytes":553931}'
# → { "data": { "uploadUrl": "https://cdn.viscollab.com/...", "storageKey": "..." } }

# 2. PUT the file bytes to uploadUrl
curl -X PUT "<uploadUrl>" \
  -H "Content-Type: application/pdf" \
  --data-binary @plan.pdf

# 3. Confirm the upload
curl -X POST https://viscollab.com/api/v1/documents \
  -H "Authorization: Bearer vc_live_..." \
  -H "Content-Type: application/json" \
  -d '{"storageKey":"<key>","filename":"plan.pdf","mime":"application/pdf"}'
# → { "data": { "id": "...", "title": "plan.pdf" } }

02

Authentication

Every request needs a Bearer token. Keys start with vc_live_ and are bound to a single workspace.

header
Authorization: Bearer vc_live_abc123...xyz

Keep your key secret. Treat it like a password. Rotate from the API keys page if exposed.

03

Endpoints

GET/api/v1/me

Returns the user, workspace, and plan tied to your API key.

response
{
  "success": true,
  "data": {
    "user": { "id": "...", "email": "you@studio.com", "name": "..." },
    "workspace": { "id": "...", "name": "Studio" },
    "plan": { "id": "solo", "currentPeriodEnd": "..." }
  }
}
POST/api/v1/uploads

Returns a presigned PUT URL valid for 15 minutes.

request body
{
  "filename": "plan.pdf",
  "mime": "application/pdf",
  "sizeBytes": 553931
}
response
{
  "success": true,
  "data": {
    "uploadUrl": "https://cdn.viscollab.com/...",
    "storageKey": "workspace-.../docs/...",
    "expiresIn": 900
  }
}
POST/api/v1/documents

Confirm a previously-uploaded file. Returns the document id + version id.

request body
{
  "storageKey": "workspace-.../docs/...",
  "filename": "plan.pdf",
  "mime": "application/pdf"
}
response
{
  "success": true,
  "data": {
    "id": "uuid",
    "title": "plan.pdf",
    "kind": "pdf",
    "versionId": "uuid",
    "sizeBytes": 553931,
    "createdAt": "..."
  }
}
GET/api/v1/documents

List up to 100 most-recent documents in your workspace.

GET/api/v1/documents/{id}

Returns the document, latest version with a 24-hour download URL, and all annotations + comments.

POST/api/v1/documents/{id}/shares

Create a guest share link. Anyone with the link can view (and optionally comment) without an account.

request body
{
  "allowComment": true,
  "expiresInDays": 14
}
response
{
  "success": true,
  "data": {
    "token": "...",
    "url": "https://viscollab.com/s/...",
    "allowComment": true,
    "expiresAt": "..."
  }
}
POST/api/v1/documents/{id}/summary

Trigger an AI summary of all annotations on the latest version. Powered by Claude via the XessOne Gateway.

response
{
  "success": true,
  "data": {
    "tldr": "1-sentence summary",
    "keyIssues": ["...", "..."],
    "priorities": ["high · ...", "medium · ..."]
  }
}

04

Errors

All responses return JSON with a success boolean. On failure, an error string is included.

json
{
  "success": false,
  "error": "unauthorized"
}
  • 401 — missing or invalid Authorization header
  • 400 — invalid request body (Zod validation)
  • 404 — document or workspace not found
  • 500 — server or AI gateway failure

05

Limits

  • Max upload: 100 MB per file
  • Allowed types: application/pdf, image/png, image/jpeg, image/webp
  • Upload URL expiry: 15 min
  • Download URL expiry: 24 h
  • AI summary: cost is deducted from your XessOne balance