Docs
Docs sind Coperas Rich-Text-Seiten. Die Docs-API erlaubt, den Dokumentenbaum zu browsen, Dokumente anzulegen und zu löschen, Metadaten zu bearbeiten, Inhalt als Markdown zu lesen und zu schreiben und über alles zu suchen, worauf Sie Zugriff haben.
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
Vollständige SDK-Dokumentation und Quellcode
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-Konfiguration und vollständige Befehlsreferenz
Verfügbar in
| Public API | CLI | MCP | Copera AI |
|---|---|---|---|
| ✅ Voll | ✅ Voll | ✅ Voll | — |
Die Docs-API und die CLI decken jede Operation ab; der gehostete MCP-Server stellt dieselbe Oberfläche KI-Clients bereit. Docs sind dem In-App-Assistenten Copera AI nicht freigegeben.
Weiter
- So funktionieren Docs — Dokumentmodell Titel/Body/Parent, Zugriffsmodell, Baum browsen, Markdown asynchron lesen und schreiben, Dokumente verwalten und Volltextsuche.
- Docs in der API-Referenz — Tree-, Search-, Get/Create/Update/Delete- und Markdown-Content-Endpunkte mit vollständigen Schemas.