Coline Docs

Introduction

Learn how to build on Coline's workspace platform — authentication, APIs, SDK, and integration patterns.

Welcome to Coline

Coline is an all-in-one productivity platform that unifies docs, tasks, messages, calendar, and AI workflows into a single workspace-native system. Everything lives in a unified virtual drive, editable through specialized views that work together instead of fragmenting your work across separate products.

These docs cover everything you need to integrate with Coline: authenticating API requests, building full apps with the SDK, and understanding our platform architecture.

The Platform Model

Coline is built on three foundational layers:

1. Primitives

The atomic data types that compose everything: message, string, number, url, file, date, user, and boolean. These primitives enable universal conversion: a spreadsheet's rows become board cards, a doc's blocks become slides, calendar events become messages.

2. Files

Every piece of content in Coline is a file with a type:

  • .doc — Block-based rich text documents
  • .sheet — Structured data with typed columns, formulas, and views
  • .board — Flexible canvas for cards, workflows, and visual organization
  • .note — Instant capture with backlinks, daily notes, and knowledge graphs
  • .slide — Presentation decks with block-based composition
  • .code — Code files with syntax highlighting (full IDE coming soon)
  • .taskboard — Project management with statuses, sprints, and assignees
  • Integration-defined types — Custom file types from third-party integrations

Files live in virtual drives (VFS) within workspaces, with granular permissions at the workspace, drive, folder, or file level.

3. Containers

Where files live and people collaborate:

  • Workspaces — Top-level boundary for teams, billing, and permissions
  • Virtual Drives — File storage with shared or personal access
  • Channels — Public or private collaboration spaces with tabs (files, messages)
  • DMs — Private conversations between one or more people
  • Calendar Events — Containers with date, invitees, message threads, and voice calls

Kairo AI

Kairo is infrastructure woven throughout the platform. The primary interface is the Kairo page — a dedicated AI chat workspace — with additional access points everywhere you work:

  • Kairo page (Cmd/Ctrl+Shift+K) — Persistent AI chat for deep work
  • Command bar (Cmd/Ctrl+K) — Quick search + AI assistance
  • @kairo in channels — Contextual help with conversation history
  • Editor assistance — Inline help in docs, sheets, and notes
  • Calendar intelligence — "Find a time when everyone is free"
  • Automations — Event-driven triggers without prompting
  • Code execution — Run sandboxed JavaScript for custom logic

Developer Experience

API-First Design

The public API is a first-class citizen from day one:

  • OpenAPI spec as the source of truth: every endpoint documented before it ships
  • TypeScript SDK — Dogfooded by our own frontend, so it actually works
  • Unified middleware chain — Auth, rate limit, usage meter, handler, response format
  • Consistent responses{ data: T } or { error: { code, message } } on every route

Authentication

Two paths to access the API:

  • API Keys — Server-to-server authentication with workspace-scoped keys
  • OAuth 2.0 — Client app flow for third-party integrations

Both use the same middleware and rate limiting infrastructure.

Integration Framework

Integrations are headless apps, not one-off adapters. Every integration implements a shared contract:

  • OAuth flow and token refresh
  • Sync orchestration into Coline primitives
  • Webhook handling with signature verification
  • Health and status reporting

Add a new integration by implementing one interface: OAuth, webhooks, sync, and UI are handled by the framework.

Core Concepts

  • Workspaces — Every resource is scoped to a workspace. API keys, OAuth clients, and data are all workspace-bound.
  • Files — Notes, docs, sheets, boards, and more are all "files" with different editors. The API treats them uniformly.
  • Primitives — Messages, strings, numbers, dates, URLs, files, users, and booleans are the atomic data types that compose everything.
  • Workspace-scoped permissions — RBAC with granularity from workspace down to individual file access.

Getting Started

The fastest way to start building:

  1. Create an API key — Head to your workspace settings and generate a key
  2. Install the SDKnpm install @colineapp/sdk
  3. Make your first request:
import { Coline } from '@colineapp/sdk'

const coline = new Coline({ apiKey: 'col_ws_...' })

// List files in a drive
const files = await coline.files.list({ driveId: '...' })

// Create a doc
const doc = await coline.files.create({
  type: 'doc',
  name: 'Project Brief',
  parentId: 'folder_id'
})

// Send a message to a channel
await coline.messages.create({
  channelId: '...',
  content: 'Hello from the SDK!'
})

Architecture Highlights

  • Cloudflare Dynamic Workers — Sandboxed code execution with ~2ms cold start, used for Kairo's execute_code tool
  • Durable Objects — Real-time WebSockets and stateful collaboration
  • Cloudflare R2 — File storage with CDN delivery
  • PostgreSQL — Primary database with workspace-scoped row-level security patterns
  • Hyperdrive — Connection pooling for serverless database access

Ready to dive in? Start with the API Reference or SDK documentation.

On this page