Enterprise API endpoints that allow enterprise users to request and manage synq keys using their enterprise API key:
Production: https://startsynqing.com/api
Development: http://localhost:3000/api
All enterprise endpoints require the Enterprise API Key in the header:
X-Enterprise-API-Key: your-enterprise-api-key
Content-Type: application/jsonCreates a named synchronizer with a unique synq key
POST /synq-keys/enterprise/synchronizerHeaders:
X-Enterprise-API-Key: your-enterprise-api-key
Content-Type: application/jsonRequest Body:
{
"name": "Production Server 1"
}Response (201 Created):
{
"success": true,
"message": "Successfully generated synchronizer",
"synchronizer": {
"id": "uuid-here",
"key": "b1df0d63-83b3-478d-a55f-a6c402e74185",
"name": "Production Server 1"
}
}cURL Example:
curl -X POST https://startsynqing.com/api/synq-keys/enterprise/synchronizer \
-H "X-Enterprise-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"name": "Production Server 1"}'Retrieve user preferences for automatic CLI configuration
GET /synq-keys/enterprise/preferencesHeaders:
X-Enterprise-API-Key: your-enterprise-api-keyResponse (200 OK):
{
"success": true,
"message": "Preferences retrieved successfully",
"preferences": {
"walletAddress": "0x1234...abcd",
"dashboardPassword": "β’β’β’β’β’β’β’β’",
"defaultAction": "service",
"web": true,
},
"owner": {
"walletAddress": "0x1234...abcd"
}
}cURL Example:
curl -X GET https://startsynqing.com/api/synq-keys/enterprise/preferences \
-H "X-Enterprise-API-Key: your-api-key-here"
**Preference Fields:**
- `walletAddress`: Default wallet address for automatic CLI setup
- `dashboardPassword`: Default dashboard password (masked for security)
- `defaultAction`: Default action to execute (start/service/web)
- `web`: Boolean to automatically start web dashboard if true
Get all synq keys/synchronizers for your enterprise account
GET /synq-keys/enterprise/synchronizersHeaders:
X-Enterprise-API-Key: your-enterprise-api-keyResponse (200 OK):
{
"success": true,
"synchronizers": [
{
"id": "uuid-1",
"key": "b1df0d63-83b3-478d-a55f-a6c402e74185",
"name": "Production Server 1",
"isEnabled": true,
"createdAt": "2024-01-15T10:30:00Z"
},
{
"id": "uuid-2",
"key": "c2ef1e74-94c4-589e-b66g-b7d513f85296",
"name": "Staging Server",
"isEnabled": false,
"createdAt": "2024-01-16T14:20:00Z"
}
]
}cURL Example:
curl -X GET https://startsynqing.com/api/synq-keys/enterprise/synchronizers \
-H "X-Enterprise-API-Key: your-api-key-here"Toggle a synchronizer's enabled status
PUT /synq-keys/enterprise/synchronizer/:id/toggleHeaders:
X-Enterprise-API-Key: your-enterprise-api-key
Content-Type: application/jsonRequest Body:
{
"isEnabled": true
}Response (200 OK):
{
"success": true,
"message": "Synchronizer enabled successfully",
"synchronizer": {
"id": "uuid-here",
"key": "b1df0d63-83b3-478d-a55f-a6c402e74185",
"name": "Production Server 1",
"isEnabled": true
}
}cURL Example:
curl -X PUT https://startsynqing.com/api/synq-keys/enterprise/synchronizer/uuid-here/toggle \
-H "X-Enterprise-API-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"isEnabled": false}'The Synchronizer CLI provides seamless integration with the Enterprise API for automated deployment and management.
npm install -g synchronizer-cliGuided setup with prompts for enterprise users
synchronize apiFeatures:
- β Prompts for Enterprise API Key
- β Optional synchronizer name input
- β Wallet address configuration
- β Dashboard password setup
- β Action selection (Start/Service/Web/Quit)
- β Automatic synq key generation
- β Complete CLI configuration
Example Flow:
$ synchronize api
π’ Enterprise API Setup
Automatically provision a synq key via Enterprise API
? Enterprise API Key: β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’
? Synchronizer name (optional): Production-Server-1
β
Synchronizer created successfully!
ID: uuid-12345
Name: Production-Server-1
Synq Key: b1df0d63-83b3-478d-a55f-a6c402e74185
? Wallet address: 0x1234567890abcdef...
? Set a password for the web dashboard? Yes
? Dashboard password: β’β’β’β’β’β’β’β’
? What would you like to do next? [S]tart, Se[R]vice, [W]eb, [Q]uit: R
π Enterprise API setup complete!
βοΈ Generating systemd service...Hands-free setup using API preferences (recommended for automation)
synchronize --api <enterprise-api-key>Features:
- β Zero prompts - completely automatic
- β Uses API preferences for wallet, password, and default action
- β Immediate execution of configured default action
- β Perfect for scripts and automated deployments
- β Fallback support if preferences not set
Example:
$ synchronize --api your-enterprise-api-key-here
π’ Automatic Enterprise API Setup
Using API preferences for hands-free configuration
π Fetching preferences from Enterprise API...
β
Preferences retrieved successfully!
Wallet: 0x1234...abcd
Password: β’β’β’β’β’β’β’β’
Default Action: service
π Creating synchronizer via Enterprise API...
β
Synchronizer created successfully!
ID: uuid-67890
Name: auto-generated-name
Synq Key: c2ef1e74-94c4-589e-b66g-b7d513f85296
π Automatic Enterprise API setup complete!
π° Wallet: 0x1234567890abcdef...
π Dashboard password protection enabled
π Executing default action: service
βοΈ Generating systemd service...
β
Service file generated successfully!# SSH into server
ssh user@production-server-1
# Install CLI globally
npm install -g synchronizer-cli
# Interactive enterprise setup
synchronize api
# Follow prompts, choose "Service" to generate systemd service
# Install and start service
sudo cp ~/.synchronizer-cli/synchronizer-cli.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable synchronizer-cli
sudo systemctl start synchronizer-cli#!/bin/bash
# deploy-synchronizer.sh
SERVER=$1
API_KEY=$2
if [ -z "$SERVER" ] || [ -z "$API_KEY" ]; then
echo "Usage: $0 <server> <enterprise-api-key>"
exit 1
fi
echo "Deploying synchronizer to $SERVER..."
ssh $SERVER << EOF
# Install CLI
npm install -g synchronizer-cli
# Automatic setup with API preferences
synchronize --api $API_KEY
# Service is automatically generated and configuration is complete
echo "Synchronizer deployed successfully!"
EOFFROM node:20-alpine
# Install CLI globally
RUN npm install -g synchronizer-cli
# Copy enterprise API key (use secrets in production)
ARG ENTERPRISE_API_KEY
ENV ENTERPRISE_API_KEY=$ENTERPRISE_API_KEY
# Setup and run
CMD ["sh", "-c", "synchronize --api $ENTERPRISE_API_KEY"]apiVersion: apps/v1
kind: Deployment
metadata:
name: synchronizer-enterprise
spec:
replicas: 3
selector:
matchLabels:
app: synchronizer
template:
metadata:
labels:
app: synchronizer
spec:
containers:
- name: synchronizer
image: node:20-alpine
command: ["/bin/sh"]
args: ["-c", "npm install -g synchronizer-cli && synchronize --api $ENTERPRISE_API_KEY"]
env:
- name: ENTERPRISE_API_KEY
valueFrom:
secretKeyRef:
name: enterprise-secrets
key: api-keyUse the included startup-synchronizer.sh script for instant cloud deployment
The synchronizer-cli package includes a production-ready startup script specifically designed for cloud instances:
π File: startup-synchronizer.sh (included in npm package)
Features:
- β Complete automation - zero manual steps required
- β Multi-cloud support - AWS EC2, DigitalOcean, Google Cloud, Azure
- β
Enterprise API integration - uses
synchronize --apifor hands-free setup - β Error handling - exits on any failure for reliable deployments
- β Progress indicators - visual feedback during installation
- β User management - configurable for different cloud providers
Quick Deployment:
# Download and customize the script
curl -o startup-synchronizer.sh https://raw.githubusercontent.com/multisynq/synchronizer-cli/main/startup-synchronizer.sh
# Replace API key placeholder
sed -i 's/\[your-api-key\]/your-actual-enterprise-api-key-here/g' startup-synchronizer.sh
# Deploy to EC2 instance (as User Data)
aws ec2 run-instances \
--image-id ami-0abcdef1234567890 \
--instance-type t3.micro \
--user-data file://startup-synchronizer.sh
# Or deploy to DigitalOcean droplet
doctl compute droplet create synchronizer-node \
--size s-1vcpu-1gb \
--image ubuntu-20-04-x64 \
--user-data-file startup-synchronizer.shScript Contents Preview:
#!/bin/bash
# startup-synchronizer.sh - Ready-to-deploy cloud startup script
set -e # Exit on any error
echo "π Starting Synchronizer Cloud Instance Setup..."
# Update package list and install dependencies
apt-get update -y
apt-get install -y curl wget
# Configure for your cloud provider
USERNAME="ubuntu" # Change to "root" for DigitalOcean
# Install Node.js via NVM and synchronizer-cli
su - $USERNAME -c "
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
export NVM_DIR=\"/home/$USERNAME/.nvm\"
[ -s \"\$NVM_DIR/nvm.sh\" ] && . \"\$NVM_DIR/nvm.sh\"
nvm install --lts
npm install -g synchronizer-cli
synchronize --api [your-api-key] # Replace with your Enterprise API key
"
echo "β
Synchronizer cloud instance setup complete!"Cloud Provider Customization:
- AWS EC2: Use as-is (username:
ubuntu) - DigitalOcean: Change
USERNAME="ubuntu"toUSERNAME="root" - Google Cloud: Use as-is (username:
ubuntu) - Azure: Use as-is (username:
azureuser) or customize as needed
- β Automatic config generation from Enterprise API
- β
Secure credential storage in
~/.synchronizer-cli/config.json - β Enterprise API key persistence for future operations
- β Synchronizer ID tracking for management
- β Systemd service generation for headless operation
- β Auto-restart capabilities with proper error handling
- β Docker container management with platform detection
- β Web dashboard setup with password protection
- β
Real-time status checking via
synchronize status - β
Points tracking via
synchronize points - β
Container logs access via
synchronize web - β
Update monitoring via
synchronize check-updates
- β
Must be a valid enterprise user (
isEnterprise: true) - β API key must exist in the database
- β User must own the synchronizers they're modifying
- β Keys are automatically associated with the enterprise user
- β Password masking in terminal input
- β Secure config storage with proper file permissions
- β API key encryption in local storage
- β Dashboard authentication with configurable passwords
// 401 Unauthorized
{
"success": false,
"message": "Unauthorized"
}
// 400 Bad Request
{
"success": false,
"message": "Synchronizer name is required"
}
// 404 Not Found
{
"success": false,
"message": "Synchronizer not found"
}
// 403 Forbidden
{
"success": false,
"message": "You can only modify your own synchronizers"
}const API_BASE = 'https://startsynqing.com/api';
const ENTERPRISE_API_KEY = 'your-enterprise-api-key';
// Create a new synchronizer
async function createSynchronizer(name) {
const response = await fetch(`${API_BASE}/synq-keys/enterprise/synchronizer`, {
method: 'POST',
headers: {
'X-Enterprise-API-Key': ENTERPRISE_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({ name })
});
return await response.json();
}
// List all synchronizers
async function listSynchronizers() {
const response = await fetch(`${API_BASE}/synq-keys/enterprise/synchronizers`, {
headers: {
'X-Enterprise-API-Key': ENTERPRISE_API_KEY
}
});
return await response.json();
}
// Toggle synchronizer
async function toggleSynchronizer(id, isEnabled) {
const response = await fetch(`${API_BASE}/synq-keys/enterprise/synchronizer/${id}/toggle`, {
method: 'PUT',
headers: {
'X-Enterprise-API-Key': ENTERPRISE_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({ isEnabled })
});
return await response.json();
}import requests
API_BASE = 'https://startsynqing.com/api'
HEADERS = {
'X-Enterprise-API-Key': 'your-enterprise-api-key',
'Content-Type': 'application/json'
}
# Create synchronizer
def create_synchronizer(name):
response = requests.post(
f'{API_BASE}/synq-keys/enterprise/synchronizer',
headers=HEADERS,
json={'name': name}
)
return response.json()
# List synchronizers
def list_synchronizers():
response = requests.get(
f'{API_BASE}/synq-keys/enterprise/synchronizers',
headers={'X-Enterprise-API-Key': HEADERS['X-Enterprise-API-Key']}
)
return response.json()These endpoints allow enterprise users to programmatically manage their synq keys for automated deployment and scaling! π