Appearance
Custom Documents API
Create, manage, and bind custom documents to stored prompts for context injection.
See the full API reference: Custom Documents API
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/custom-documents | List documents |
POST | /api/v1/custom-documents | Create a document |
GET | /api/v1/custom-documents/:id | Get document detail |
PATCH | /api/v1/custom-documents/:id | Update a document |
DELETE | /api/v1/custom-documents/:id | Delete a document |
GET | /api/v1/custom-documents/:id/bindings | List prompt bindings |
POST | /api/v1/custom-documents/:id/bindings | Bind to a prompt |
DELETE | /api/v1/custom-documents/:id/bindings/:bindingId | Remove a binding |
Quick Example
bash
# Create a document
curl -X POST http://localhost:3000/api/v1/custom-documents \
-H "Cookie: $SESSION_COOKIE" \
-H "Content-Type: application/json" \
-d '{
"typeId": "clx123...",
"name": "My Agent Config",
"content": "# Agent\n\n## Tools\n- Read\n- Write",
"metadata": {"runtime": "claude-code"},
"tags": ["agent", "claude"]
}'
# Bind document to a prompt
curl -X POST http://localhost:3000/api/v1/custom-documents/DOC_ID/bindings \
-H "Cookie: $SESSION_COOKIE" \
-H "Content-Type: application/json" \
-d '{"storedPromptId": "PROMPT_ID", "injectionMode": "prepend"}'