Documents Module
Upload, organize, and control access to files and documents.
What Can You Do?
- 🟢 Easy — Click Around
- 🔵 Advanced — API / Code
Upload files — Add documents with titles, descriptions, and categories.
Organize — Put files into categories (reports, templates, policies, meeting minutes).
Version control — Upload new versions of a document. Old versions are kept.
Sharing — Control who can see each document.
Comments — Add notes or feedback on documents.
Try it now:
- Click Documents in the sidebar
- Browse 28 seeded documents — reports, templates, policies, meeting minutes
- Click on a document to see its details and version history
- Check the document statistics
API Endpoints (13)
| Method | Endpoint | Description | Auth |
|---|---|---|---|
GET | /documents/ | List documents | Staff+ |
POST | /documents/ | Upload document | Staff+ |
GET | /documents/stats | Document statistics | Staff+ |
GET | /documents/{id} | Get document | Staff+ |
PUT | /documents/{id} | Update document | Staff+ |
DELETE | /documents/{id} | Delete document | Admin |
POST | /documents/{id}/versions | Upload new version | Staff+ |
GET | /documents/{id}/versions | List versions | Staff+ |
GET | /documents/categories | List categories | Member |
POST | /documents/categories | Create category | Staff+ |
POST | /documents/{id}/share | Share document | Staff+ |
POST | /documents/{id}/comments | Add comment | Member |
GET | /documents/{id}/comments | List comments | Member |
Example: Upload a Document
curl -X POST https://ams.14.jugaar.ai/api/v1/documents/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Q2 Financial Report",
"description": "Quarterly financial summary",
"category": "reports",
"content": "Full report text here..."
}'