API Reference
Complete REST API documentation for QuantumLock™.
Base URL
https://api.softquantus.com
Authentication
All authenticated endpoints require an API key in the Authorization header:
Authorization: Bearer ql_your_api_key_here
Get your API key by registering an account.
Endpoints
Health Check
Check API status (no authentication required).
GET /health
Response:
{
"status": "healthy",
"timestamp": "2025-12-14T10:30:00Z",
"quantum_ready": true
}
Register Customer
Create a new B2B customer account.
POST /api/v1/customers/register
Request Body:
{
"email": "your-company@example.com",
"company_name": "Your Company Inc",
"plan": "professional"
}
Parameters:
email(string, required): Company email addresscompany_name(string, required): Company nameplan(string, required): Plan tier:starter,professional, orenterprise
Response (201 Created):
{
"id": "cust_abc123xyz",
"email": "your-company@example.com",
"company_name": "Your Company Inc",
"api_key": "ql_a1b2c3d4e5f6...",
"plan": "professional",
"monthly_license_limit": 1000,
"licenses_generated_this_month": 0,
"created_at": "2025-12-14T10:30:00Z"
}
⚠️ Important: The api_key is only returned once. Save it securely.
Get Customer Info
Get your account information.
GET /api/v1/customers/me
Authorization: Bearer ql_your_api_key
Response (200 OK):
{
"id": "cust_abc123xyz",
"email": "your-company@example.com",
"company_name": "Your Company Inc",
"plan": "professional",
"monthly_limit": 1000,
"used_this_month": 45,
"created_at": "2025-12-14T10:30:00Z"
}
Generate License
Generate a quantum-enhanced license for your end customer.
POST /api/v1/licenses/generate
Authorization: Bearer ql_your_api_key
Content-Type: application/json
Request Body:
{
"end_customer_id": "customer-123",
"features": ["premium", "api_access", "real_quantum"],
"expires_in_days": 365,
"metadata": {
"company": "Acme Corp",
"plan": "enterprise",
"max_users": 100
}
}
Parameters:
end_customer_id(string, required): Your customer's unique identifierfeatures(array, required): List of feature names to enableexpires_in_days(integer, optional): Days until expiration (default: 365, max: 3650)metadata(object, optional): Custom metadata (key-value pairs)
Response (200 OK):
{
"license_key": "QCOS-ABCD-EFGH-IJKL-MNOP",
"customer_id": "cust_abc123xyz",
"end_customer_id": "customer-123",
"features": ["premium", "api_access", "real_quantum"],
"issued_at": "2025-12-14T10:35:00Z",
"expires_at": "2026-12-14T10:35:00Z",
"quantum_signature": "q1:0.9876|q2:0.9823|q3:0.9901|q4:0.9889...",
"quantum_fidelity": 0.9986,
"generation_time_ms": 28,
"metadata": {
"company": "Acme Corp",
"plan": "enterprise",
"max_users": 100
}
}
Error Responses:
429 Too Many Requests - Monthly limit reached:
{
"detail": "Monthly license limit reached (1000). Please upgrade your plan or wait for next month."
}
Validate License
Validate a license key (no authentication required).
POST /api/v1/licenses/validate
Content-Type: application/json
Request Body:
{
"license_key": "QCOS-ABCD-EFGH-IJKL-MNOP"
}
Response (200 OK) - Valid License:
{
"valid": true,
"customer_id": "cust_abc123xyz",
"end_customer_id": "customer-123",
"features": ["premium", "api_access", "real_quantum"],
"issued_at": "2025-12-14T10:35:00Z",
"expires_at": "2026-12-14T10:35:00Z",
"days_remaining": 365,
"quantum_verified": true,
"metadata": {
"company": "Acme Corp",
"plan": "enterprise"
}
}
Response (200 OK) - Invalid License:
{
"valid": false,
"quantum_verified": false
}
Get Statistics
Get your license generation statistics.
GET /api/v1/stats
Authorization: Bearer ql_your_api_key
Response (200 OK):
{
"total_licenses": 450,
"active_licenses": 380,
"expired_licenses": 70,
"this_month": 45,
"monthly_limit": 1000,
"quantum_fidelity_avg": 0.9986,
"generation_time_avg_ms": 28
}
Get SDK Information
Get SDK installation instructions for a specific language.
GET /api/v1/sdk/{language}
Path Parameters:
language: One ofpython,nodejs,java,csharp
Response (200 OK):
{
"language": "Python",
"installation": "pip install quantumlock-sdk",
"import": "from quantumlock_sdk import LicenseValidator",
"example": "...",
"docs": "https://docs.softquantus.com/docs/quantumlock/sdk-reference"
}
Error Codes
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid API key |
| 404 | Not Found |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
Rate Limits
| Plan | Rate Limit |
|---|---|
| Starter | 100 requests/second |
| Professional | 500 requests/second |
| Enterprise | 2000 requests/second |
SDK Code Examples
See SDK Reference for complete integration examples.
Interactive API Explorer
Visit the interactive API documentation to test endpoints in your browser.