Skip to content

Sharokey API Documentation ​

πŸš€ Zero Knowledge Secret Sharing API ​

Welcome to the complete developer documentation for Sharokey, the secure secret sharing platform with Zero Knowledge encryption.

πŸ” Security First

All secrets are encrypted client-side using AES-GCM-256 + PBKDF2 (10,000 iterations) before being sent to our servers. We never see your data in plain text.

πŸ“š What's Available ​

πŸ”Œ API Reference

Authentication guide and API documentation.

View API β†’

πŸ“¦ Client Libraries

4 official libraries: CLI C#, JavaScript SDK, JavaScript CDN, and Python SDK.

Browse Libraries β†’

πŸ’‘ CLI C# Documentation

Cross-platform command-line tool for automation, scripting, and CI/CD integration.

CLI Guide β†’

πŸ“« Python SDK

Modern async Python SDK with CLI-consistent method naming.

Python Guide β†’

⚑ Quick Start ​

Choose your preferred method to start using Sharokey:

bash
# Download the CLI
curl -O https://github.com/sharokey/cli/releases/latest/download/sharokey.exe

# Configure your token
sharokey config --token YOUR_API_TOKEN

# Create your first secret
sharokey create "My secret password" --hours 24 --views 1
javascript
// Install via npm
npm install sharokey-client

// Usage in Node.js/modern web apps
import { SharokeyClient } from 'sharokey-client';
const client = new SharokeyClient({ token: 'YOUR_API_TOKEN' });
const secret = await client.createSecret('My secret', {hours: 24, views: 1});
console.log(secret.share_url);
html
<!-- Include the script -->
<script src="https://cdn.sharokey.com/js/sharokey.js"></script>

<script>
  // Configure and use
  Sharokey.config({ token: 'YOUR_API_TOKEN' });
  const secret = await Sharokey.create('My secret', 24, 1);
  console.log(secret.share_url);
</script>
python
# Install the SDK
pip install sharokey

# Basic usage
import sharokey

client = sharokey.SharokeyClient(token='YOUR_API_TOKEN')
secret = await client.create('My secret', 24, 1)
print(secret.share_url)
bash
# Direct API call
curl -X POST https://api.sharokey.com/api/v1/secrets \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "encrypted_secret_data",
    "keyA": "server_key",
    "hours": 24,
    "maximum_views": 1
  }'

πŸ” Zero Knowledge Architecture ​

How it works:

  1. Your data never leaves your device in plain text
  2. Encryption happens in your browser/application
  3. Two-key system: KeyA (stored on server) + KeyB (in share URL)
  4. Both keys required to decrypt the secret
  5. We can't decrypt your data - true Zero Knowledge

🌟 Features ​

FeatureDescription
πŸ” Zero KnowledgeClient-side encryption, we never see your secrets
πŸ“Ž File AttachmentsUpload files up to 10MB with your secrets
πŸ“± OTP ProtectionEmail & SMS verification for extra security
⏰ Expiration ControlTime and view limits for automatic cleanup
🌍 Multi-domainCustom domains for branded secret sharing
πŸ“Š Usage AnalyticsTrack secret creation and access patterns
πŸ”Œ REST APIComplete programmatic access
πŸ“š 4 LibrariesCLI, JavaScript, Python - choose your stack

🚦 Getting Your API Token ​

  1. Sign up at sharokey.com
  2. Go to Settings β†’ API Tokens
  3. Create a new token with appropriate scopes
  4. Copy your token and keep it secure

πŸ”‘ Token Security

Never commit your API tokens to version control or expose them in client-side code. Store them as environment variables or in secure configuration files.

πŸ“– Documentation Sections ​

πŸ”Œ API Reference ​

Complete REST API documentation covering all endpoints, authentication methods, request/response formats, and error codes.

πŸ“¦ Client Libraries ​

Official libraries for different programming languages with installation guides, examples, and feature comparisons.

πŸ’‘ Code Examples ​

Practical tutorials and code samples for common integration patterns and use cases.

🀝 Support & Community ​

πŸ“œ License ​

This documentation is released under the MIT License.
Sharokey API is a commercial service with free tier available.


Released under the MIT License.