API Reference
Complete API documentation for Archivus Document Intelligence Platform
Archivus provides a comprehensive REST API covering document management, AI features, search, collaboration, and enterprise features.
Quick Start
Base URLs
Production: https://api.archivus.app/api/v1
Development: http://localhost:8080/api/v1
Authentication
Archivus supports two authentication methods:
API Key Authentication (Recommended for integrations):
curl -H "X-API-Key: ak_live_YOUR_API_KEY" \
https://api.archivus.app/api/v1/documents
JWT Session Authentication (For browser apps):
curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "X-Tenant-Subdomain: your-tenant" \
https://api.archivus.app/api/v1/documents
See the Authentication guide for detailed information.
Response Formats
Success Responses
Data is returned directly at the root level (not wrapped in a data field):
{
"id": "doc_abc123",
"filename": "document.pdf",
"status": "completed"
}
Paginated Responses
List endpoints return structured pagination:
{
"data": [
{"id": "doc_1", "filename": "doc1.pdf"},
{"id": "doc_2", "filename": "doc2.pdf"}
],
"total": 100,
"page": 1,
"page_size": 20,
"total_pages": 5
}
Error Responses
Consistent error format:
{
"error": "not_found",
"code": "NOT_FOUND",
"message": "Document with ID 'abc123' not found"
}
See the Errors guide for complete error handling information.
Quick Example
# 1. Login
curl -X POST https://api.archivus.app/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "your-password",
"tenant_subdomain": "your-tenant"
}'
# Response includes JWT token
{
"token": "eyJhbGc...",
"user": { ... },
"tenant": { ... }
}
# 2. Use token for authenticated requests
curl -H "Authorization: Bearer eyJhbGc..." \
-H "X-Tenant-Subdomain: your-tenant" \
https://api.archivus.app/api/v1/documents
API Categories
Core Features
- Authentication - Login, register, OAuth, API keys
- Documents - Upload, manage, download, search
- Folders - Organization and structure
- Search - Full-text and semantic search
- Chat - AI-powered document Q&A
Advanced Features
- Webhooks - Real-time event notifications
- Rate Limits - Understanding rate limits
- Errors - Error handling and codes
Endpoint Summary
Authentication (14 endpoints)
- Login, register, logout
- Password reset and email verification
- OAuth (Google, Apple, GitHub)
- API key management
- CSRF token management
Documents (22 endpoints)
- Upload (single and batch)
- List, get, update, delete
- Download, preview, thumbnail
- Share and permissions
- Search and filtering
- Version management
Chat (18 endpoints)
- Create chat sessions
- Ask questions (single and multi-document)
- RAG queries (Pro+)
- Message history
- Session management
Search (4 endpoints)
- Semantic search
- Keyword search
- Hybrid search
- Enhanced search (Pro+)
Folders (8 endpoints)
- Create, list, update, delete
- Nested folder support
- Folder permissions
Webhooks (5 endpoints)
- Create and manage webhooks
- Event types
- Webhook verification
Rate Limits
Archivus enforces rate limits based on your subscription tier:
| Tier | Rate Limit |
|---|---|
| Free | 15 requests/minute |
| Starter | 30 requests/minute |
| Pro | 120 requests/minute |
| Team | 300 requests/minute |
| Enterprise | Unlimited |
See the Rate Limits guide for detailed information.
SDKs & Libraries
Use our official SDKs to integrate Archivus:
- Go SDK - Native Go client (recommended for Go apps)
- Python SDK - Full-featured Python client
- JavaScript SDK - TypeScript/JavaScript client
- cURL Examples - Command-line examples
Best Practices
Authentication
- Use API keys for server-to-server integrations
- Use JWT tokens for web/mobile applications
- Store tokens securely - Never commit to version control
- Refresh tokens before expiration
Error Handling
- Always check status codes - Handle 4xx and 5xx errors
- Retry with exponential backoff - For transient errors
- Log errors - For debugging and monitoring
- Handle rate limits - Implement rate limit handling
Performance
- Use pagination - Don’t fetch all data at once
- Cache responses - Reduce API calls
- Batch operations - Use batch endpoints when available
- Monitor rate limits - Stay within your tier limits
Next Steps
- Authentication Guide - Learn how to authenticate
- Documents API - Complete document management
- Chat API - AI-powered document Q&A
- Search API - Find documents by meaning
- Error Handling - Handle errors properly
- Rate Limits - Understand rate limits
Support
- API Support: support@ubiship.com
- Documentation: docs.archivus.app
Ready to get started? Check out the Authentication guide to begin integrating with Archivus!