Organizing Documents

Learn how to organize documents using folders, tags, and collections in Archivus.


Overview

Archivus provides multiple ways to organize documents:

  • Folders - Hierarchical organization (like file system folders)
  • Tags - Flexible labeling system
  • Collections - Group related documents
  • AI Auto-Tagging - Automatic organization

Folders

Folders provide hierarchical organization, similar to a file system.

Create a Folder

curl -X POST https://api.archivus.app/api/v1/folders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Tenant-Subdomain: your-tenant" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Contracts",
    "parent_id": null,
    "color": "#3B82F6",
    "icon": "folder"
  }'

Response:

{
  "id": "folder_abc123",
  "name": "Contracts",
  "parent_id": null,
  "color": "#3B82F6",
  "icon": "folder",
  "document_count": 0,
  "created_at": "2025-12-16T10:30:00Z"
}

Nested Folders

Create subfolders for better organization:

# Create parent folder
curl -X POST https://api.archivus.app/api/v1/folders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Tenant-Subdomain: your-tenant" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Legal",
    "parent_id": null
  }'

# Create subfolder
curl -X POST https://api.archivus.app/api/v1/folders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Tenant-Subdomain: your-tenant" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Contracts",
    "parent_id": "folder_legal"
  }'

Move Document to Folder

curl -X PUT https://api.archivus.app/api/v1/documents/doc_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Tenant-Subdomain: your-tenant" \
  -H "Content-Type: application/json" \
  -d '{
    "folder_id": "folder_abc123"
  }'

List Folders

curl https://api.archivus.app/api/v1/folders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Tenant-Subdomain: your-tenant"

Tags

Tags provide flexible, non-hierarchical organization. Documents can have multiple tags.

Add Tags to Document

curl -X PUT https://api.archivus.app/api/v1/documents/doc_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Tenant-Subdomain: your-tenant" \
  -H "Content-Type: application/json" \
  -d '{
    "tags": ["important", "contract", "legal", "Q4-2025"]
  }'

Create Tag

curl -X POST https://api.archivus.app/api/v1/tags \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Tenant-Subdomain: your-tenant" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "urgent",
    "color": "#EF4444"
  }'

List Tags

curl https://api.archivus.app/api/v1/tags \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Tenant-Subdomain: your-tenant"

Filter by Tag

curl "https://api.archivus.app/api/v1/documents?tag_id=tag_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Tenant-Subdomain: your-tenant"

AI Auto-Tagging

Archivus automatically suggests tags based on document content.

Enable Auto-Tagging

Auto-tagging is enabled by default when uploading with enable_ai=true:

curl -X POST https://api.archivus.app/api/v1/documents/upload \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Tenant-Subdomain: your-tenant" \
  -F "file=@document.pdf" \
  -F "enable_ai=true"

After processing, check AI-suggested tags:

curl https://api.archivus.app/api/v1/documents/doc_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Tenant-Subdomain: your-tenant"

Response includes:

{
  "id": "doc_abc123",
  "ai_tags": ["contract", "legal", "service-agreement", "Q4-2025"],
  "ai_categories": ["legal", "business"]
}

Apply AI Tags

Automatically apply AI-suggested tags:

curl -X POST https://api.archivus.app/api/v1/documents/doc_abc123/apply-ai-tags \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Tenant-Subdomain: your-tenant"

Code Examples

Python - Organize Documents

import requests

class ArchivusOrganizer:
    def __init__(self, api_key, tenant):
        self.api_key = api_key
        self.tenant = tenant
        self.base_url = "https://api.archivus.app/api/v1"
        self.headers = {
            "Authorization": f"Bearer {api_key}",
            "X-Tenant-Subdomain": tenant
        }
    
    def create_folder(self, name, parent_id=None, color="#3B82F6"):
        url = f"{self.base_url}/folders"
        data = {"name": name, "color": color}
        if parent_id:
            data["parent_id"] = parent_id
        
        response = requests.post(url, headers=self.headers, json=data)
        return response.json()
    
    def move_document(self, document_id, folder_id):
        url = f"{self.base_url}/documents/{document_id}"
        data = {"folder_id": folder_id}
        response = requests.put(url, headers=self.headers, json=data)
        return response.json()
    
    def add_tags(self, document_id, tags):
        url = f"{self.base_url}/documents/{document_id}"
        data = {"tags": tags}
        response = requests.put(url, headers=self.headers, json=data)
        return response.json()

# Usage
organizer = ArchivusOrganizer("YOUR_API_KEY", "your-tenant")

# Create folder structure
legal_folder = organizer.create_folder("Legal")
contracts_folder = organizer.create_folder("Contracts", parent_id=legal_folder["id"])

# Move document
organizer.move_document("doc_abc123", contracts_folder["id"])

# Add tags
organizer.add_tags("doc_abc123", ["important", "contract", "Q4-2025"])

JavaScript - Organize Documents

class ArchivusOrganizer {
  constructor(apiKey, tenant) {
    this.apiKey = apiKey;
    this.tenant = tenant;
    this.baseURL = 'https://api.archivus.app/api/v1';
    this.headers = {
      'Authorization': `Bearer ${apiKey}`,
      'X-Tenant-Subdomain': tenant
    };
  }
  
  async createFolder(name, parentId = null, color = '#3B82F6') {
    const response = await fetch(`${this.baseURL}/folders`, {
      method: 'POST',
      headers: { ...this.headers, 'Content-Type': 'application/json' },
      body: JSON.stringify({ name, parent_id: parentId, color })
    });
    return response.json();
  }
  
  async moveDocument(documentId, folderId) {
    const response = await fetch(`${this.baseURL}/documents/${documentId}`, {
      method: 'PUT',
      headers: { ...this.headers, 'Content-Type': 'application/json' },
      body: JSON.stringify({ folder_id: folderId })
    });
    return response.json();
  }
  
  async addTags(documentId, tags) {
    const response = await fetch(`${this.baseURL}/documents/${documentId}`, {
      method: 'PUT',
      headers: { ...this.headers, 'Content-Type': 'application/json' },
      body: JSON.stringify({ tags })
    });
    return response.json();
  }
}

// Usage
const organizer = new ArchivusOrganizer('YOUR_API_KEY', 'your-tenant');

// Create folder structure
const legalFolder = await organizer.createFolder('Legal');
const contractsFolder = await organizer.createFolder('Contracts', legalFolder.id);

// Move document
await organizer.moveDocument('doc_abc123', contractsFolder.id);

// Add tags
await organizer.addTags('doc_abc123', ['important', 'contract', 'Q4-2025']);

Organization Strategies

By Project

Use folders for projects:

Projects/
            Project Alpha/
                 Contracts/
                 Invoices/
                 Reports/
            Project Beta/
                Contracts/
                Documentation/

By Document Type

Use folders for document types:

Documents/
  ├── Contracts/
  ├── Invoices/
  ├── Reports/
  └── Legal/

By Date/Period

Use tags for time-based organization:

  • Tags: Q1-2025, Q2-2025, Q3-2025, Q4-2025
  • Tags: 2024, 2025
  • Tags: January, February, March

By Status

Use tags for workflow status:

  • Tags: draft, review, approved, archived
  • Tags: urgent, important, normal
  • Tags: pending-signature, signed, expired

Hybrid Approach

Combine folders and tags:

  • Folders: Broad categories (Legal, Finance, HR)
  • Tags: Specific attributes (urgent, Q4-2025, contract)

Best Practices

Folder Structure

  1. Keep it shallow - 2-3 levels deep maximum
  2. Use consistent naming - Follow a naming convention
  3. Don’t over-organize - Too many folders slows navigation
  4. Use colors - Color-code folders for quick identification

Tagging

  1. Use consistent tags - Create tag standards
  2. Don’t over-tag - 3-5 tags per document is usually enough
  3. Use AI suggestions - Review and apply AI-suggested tags
  4. Combine with folders - Use tags for cross-cutting concerns

AI Auto-Tagging

  1. Review AI tags - Always review before applying
  2. Refine over time - AI learns from your corrections
  3. Use for discovery - AI tags help find related documents

Next Steps


Questions? Check the FAQ or contact support@ubiship.com