Docs
Docs are Copera's rich-text pages. The Docs API lets you browse the document tree, create and delete documents, edit their metadata, read and write their content as markdown, and search across everything you can access.
Quick Start
- REST API
- Node.js SDK
- CLI
# Browse the document tree (root level)
curl -X GET https://api.copera.ai/public/v1/docs/tree \
-H "Authorization: Bearer YOUR_API_KEY"
# Search documents
curl -X GET "https://api.copera.ai/public/v1/docs/search?q=onboarding" \
-H "Authorization: Bearer YOUR_API_KEY"
# Read a document's markdown content
curl -X GET https://api.copera.ai/public/v1/docs/DOC_ID/md \
-H "Authorization: Bearer YOUR_API_KEY"
# Create a document
curl -X POST https://api.copera.ai/public/v1/docs/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "title": "New Doc", "content": "# Hello" }'
npm install @copera.ai/sdk
import { CoperaAI } from '@copera.ai/sdk';
const copera = CoperaAI({ apiKey: 'YOUR_API_KEY' });
// Browse the tree (omit parentId for root, set depth to control descent)
const tree = await copera.doc.getDocTree({ depth: 3 });
// Search documents
const results = await copera.doc.searchDocs({ q: 'onboarding' });
// Read a document's markdown content
const { content } = await copera.doc.getDocContent({ docId: 'DOC_ID' });
// Create a document
const doc = await copera.doc.createDoc({
title: 'New Doc',
content: '# Hello',
});
// Append to a document's content
await copera.doc.updateDocContent({
docId: 'DOC_ID',
operation: 'append',
content: '\n\nMore content',
});
@copera.ai/sdk
Full SDK documentation and source code
curl -fsSL https://cli.copera.ai/install.sh | bash
# Docs commands require a Personal Access Token
copera docs tree
copera docs tree --parent <doc-id>
copera docs search "keyword"
copera docs get <doc-id>
copera docs content <doc-id>
# Create and update
copera docs create --title "New Doc" --content "Initial content"
copera docs update <doc-id> --content "Replacement content"
copera docs update <doc-id> --operation append --content "More content"
copera docs delete <doc-id> --force
copera-cli
CLI configuration and full command reference
Available in
| Public API | CLI | MCP | Copera AI |
|---|---|---|---|
| ✅ Full | ✅ Full | ✅ Full | — |
The Docs API and the CLI cover every operation; the hosted MCP server exposes the same surface to AI clients. Docs are not exposed to the in-app Copera AI assistant.
Next
- How Docs Work — the title/body/parent document model, the access model, browsing the tree, reading and writing markdown content asynchronously, managing documents, and full-text search.
- Docs in the API Reference — tree, search, get/create/update/delete, and markdown content endpoints with full schemas.