API Reference
Welcome to the Sharokey API documentation. Sharokey provides secure secret sharing with Zero Knowledge encryption through our official SDKs.
🚀 Quick Start
Instead of using the raw API directly, we strongly recommend using our official client libraries for the best developer experience:
Official SDKs:
- CLI C# - Cross-platform command-line interface for automation and scripting
- JavaScript SDK - Full-featured library for Node.js and modern web applications
- JavaScript CDN - Simple browser integration without build tools
- Python SDK - Async Python client with CLI-consistent API
🔐 Zero Knowledge Security
All our SDKs implement client-side encryption automatically:
- AES-256-GCM encryption with PBKDF2 key derivation
- Automatic key generation and secure splitting
- No plaintext transmission - server never sees your secrets
- Simple API - complexity hidden behind easy-to-use methods
📖 API Documentation
Our API documentation focuses on the data structures and responses you'll receive when using the SDKs:
| Section | Description |
|---|---|
| Authentication | Token setup and configuration |
| Secrets | Secret creation, retrieval, and management |
| Secret Requests | Request secrets from third parties securely |
| Attachments | File upload and encryption |
| Statistics | Company usage analytics |
| Error Handling | Error codes and troubleshooting |
| Rate Limits | API usage limits and best practices |
⚡ SDK Advantages
Why Use Our SDKs?
🔒 Security Handled Automatically:
- Client-side encryption before transmission
- Secure key generation and management
- IV/salt generation per secret
- No crypto implementation required
🛠️ Developer Experience:
- Simple, intuitive APIs
- Automatic error handling
- Built-in retry logic
- Comprehensive documentation
📦 Batteries Included:
- Authentication management
- File attachment handling
- Progress tracking for uploads
- Cross-platform compatibility
🌟 Choose Your SDK
CLI C# - Command Line
Perfect for automation, CI/CD pipelines, and system administration.
sharokey create "Database password" --hours 24 --views 1JavaScript SDK - Full Featured
Ideal for Node.js backends and modern web applications.
const secret = await client.createSecret("Database password", {
hours: 24, views: 1
});JavaScript CDN - Simple Integration
Quick browser integration without build tools.
const secret = await Sharokey.create("Database password", 24, 1);Python SDK - Async Ready
Modern async Python client for server applications.
secret = await client.create("Database password", hours=24, views=1)🔑 Authentication
All SDKs handle authentication automatically once configured. See our Authentication Guide for setup instructions.
🔗 Next Steps
- Choose a Library - Pick the SDK that fits your stack
- Set up Authentication - Configure your API token
- Start Building - Follow the quickstart for your chosen SDK
For raw API details, see the individual API documentation sections above. However, we recommend using our SDKs for the best experience.
