Skip to main content

QuantumLock™ API Reference

Complete reference for the QuantumLock™ REST API.

Base URL: https://quantumlock.softquantus.com

Version: 1.0.0


Authentication

All authenticated requests require the header X-API-Key:

X-API-Key: your_api_key

Get your API Key at the Portal SoftQuantus.

The API Key format is: qlk_<token> (e.g., qlk_abc123def456...).

Nota: KMS (M2M) endpoints use authentication via Authorization: Bearer svc_<token>.


Endpoints

Overview

MethodEndpointAuthDescription
GET/NoAPI Information
GET/healthNoHealth check
POST/api/v1/licenses/generateX-API-KeyGenerate license
POST/api/v1/licenses/validateX-API-KeyValidate license
GET/api/v1/licensesX-API-KeyList licenses
GET/api/v1/licenses/{license_key}X-API-KeyLicense details
POST/api/v1/licenses/{license_key}/revokeX-API-KeyRevoke license
GET/api/v1/revocationsX-API-KeyRevocation list (SDK sync)
GET/api/v1/statsX-API-KeyUsage statistics
GET/api/v1/customers/meX-API-KeyAccount information
GET/api/v1/plansNoAvailable plans
POST/api/v1/kms/signBearerSign data (M2M)
POST/api/v1/kms/verifyBearerVerify signature (M2M)

Licenses

Generate License

Generates a quantum license for your end customer. Each license is protected with a unique quantum fingerprint generated by QCOS Autopilot.

POST /api/v1/licenses/generate

Headers:

X-API-Key: your_api_key
Content-Type: application/json

Request Body:

CampoTipoRequiredDefaultDescription
end_customer_idstringUnique ID of your end customer (e.g., email, user_id)
featuresstring[]No[]Features to enable in the license
valid_daysintegerNo365Validity days (1–3650)
metadataobjectNonullCustom metadata

Exemplo:

curl -X POST "https://quantumlock.softquantus.com/api/v1/licenses/generate" \
-H "X-API-Key: qlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"end_customer_id": "user@acmecorp.com",
"features": ["premium", "api_access", "analytics"],
"valid_days": 365,
"metadata": {"company": "Acme Corp"}
}'

Response (201 Created):

{
"license_key": "QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320",
"quantum_signature": "a1b2c3d4e5f6...",
"end_customer_id": "user@acmecorp.com",
"features": ["premium", "api_access", "analytics"],
"valid_until": "2026-06-15T10:30:00",
"quantum_verified": true,
"qcos_fidelity": 0.9847,
"security_level": "Quantum-QCOS-16Q",
"generated_at": "2025-06-15T10:30:00"
}

Rate Limits by plan:

PlanoLicenses/month
Free100
Startup10.000
Business100.000
EnterpriseUnlimited

Erros:

CodeDescription
401Invalid or inactive API Key
429Monthly license limit reached
500Internal generation error

Validate License

Validates an existing quantum license. Re-generates the quantum state and compares the signature.

POST /api/v1/licenses/validate

Headers:

X-API-Key: your_api_key
Content-Type: application/json

Request Body:

CampoTipoRequiredDescription
license_keystringLicense key
end_customer_idstringEnd customer ID (must match the generation)

Exemplo:

curl -X POST "https://quantumlock.softquantus.com/api/v1/licenses/validate" \
-H "X-API-Key: qlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"license_key": "QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320",
"end_customer_id": "user@acmecorp.com"
}'

Response (200 OK):

{
"valid": true,
"end_customer_id": "user@acmecorp.com",
"quantum_verified": true,
"message": "License valid"
}

Possible message responses:

validmessage
true"License valid"
false"License not found or does not match end-customer ID"
false"License expired"
false"Quantum signature mismatch"

List Licenses

Lists all licenses generated by your account with pagination and filters.

GET /api/v1/licenses

Headers:

X-API-Key: your_api_key

Query Parameters:

ParameterTipoDefaultDescription
pageinteger1Page number
per_pageinteger50Items per page (max: 100)
status_filterstringFilter by: active, expired, revoked

Exemplo:

curl "https://quantumlock.softquantus.com/api/v1/licenses?page=1&per_page=20&status_filter=active" \
-H "X-API-Key: qlk_your_api_key"

Response (200 OK):

{
"licenses": [
{
"id": 1,
"license_key": "QCOS-41FB-639F-...",
"end_customer_id": "user@acmecorp.com",
"features": ["premium", "api_access"],
"valid_until": "2026-06-15T10:30:00",
"created_at": "2025-06-15T10:30:00",
"status": "active",
"revoked": false
}
],
"total": 42,
"page": 1,
"per_page": 20,
"total_pages": 3
}

License Details

Returns complete information for a specific license.

GET /api/v1/licenses/{license_key}

Headers:

X-API-Key: your_api_key

Exemplo:

curl "https://quantumlock.softquantus.com/api/v1/licenses/QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320" \
-H "X-API-Key: qlk_your_api_key"

Response (200 OK):

{
"id": 1,
"license_key": "QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320",
"end_customer_id": "user@acmecorp.com",
"features": ["premium", "api_access"],
"valid_until": "2026-06-15T10:30:00",
"created_at": "2025-06-15T10:30:00",
"quantum_signature": "a1b2c3d4e5f6...",
"qcos_fidelity": "0.9847",
"status": "active",
"revoked": false,
"revoked_at": null,
"revoked_reason": null
}

Erros:

CodeDescription
404License not found

Revoke License

Permanently revokes a license. This action cannot be undone.

POST /api/v1/licenses/{license_key}/revoke

Headers:

X-API-Key: your_api_key
Content-Type: application/json

Request Body:

CampoTipoRequiredDescription
reasonstringNoReason for revocation

Exemplo:

curl -X POST "https://quantumlock.softquantus.com/api/v1/licenses/QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320/revoke" \
-H "X-API-Key: qlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"reason": "Customer cancelled subscription"}'

Response (200 OK):

{
"success": true,
"license_key": "QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320",
"revoked_at": "2025-06-15T14:30:00",
"reason": "Customer cancelled subscription",
"message": "License revoked successfully"
}

Erros:

CodeDescription
400License already revoked
404License not found

Revocation List

Returns IDs of revoked licenses for synchronization with the offline SDK.

GET /api/v1/revocations

Headers:

X-API-Key: your_api_key

Query Parameters:

ParameterTipoDescription
sincestring (ISO 8601)Timestamp for incremental sync (optional)

Exemplo:

curl "https://quantumlock.softquantus.com/api/v1/revocations?since=2025-06-01T00:00:00Z" \
-H "X-API-Key: qlk_your_api_key"

Response (200 OK):

{
"revoked_ids": [
"QCOS-41FB-639F-...",
"QCOS-7A2E-BC31-..."
],
"count": 2,
"timestamp": "2025-06-15T14:30:00"
}

Account and Statistics

Account Information

GET /api/v1/customers/me

Headers:

X-API-Key: your_api_key

Response (200 OK):

{
"id": 1,
"name": "acme_corp",
"email": "admin@acmecorp.com",
"company_name": "Acme Corporation",
"plan": "startup",
"max_licenses_month": 10000,
"licenses_used_month": 342,
"created_at": "2025-01-15T08:00:00",
"email_verified": true
}

Usage Statistics

GET /api/v1/stats

Headers:

X-API-Key: your_api_key

Response (200 OK):

{
"licenses_generated_month": 342,
"licenses_remaining_month": 9658,
"plan": "startup",
"max_licenses_month": 10000
}

Plans

List Available Plans

GET /api/v1/plans

This endpoint does not require authentication.

Response (200 OK):

[
{
"name": "Free",
"price_monthly": "$0",
"licenses_per_month": 100,
"features": ["Basic quantum security", "Email support", "Community access"]
},
{
"name": "Startup",
"price_monthly": "$99",
"licenses_per_month": 10000,
"features": ["Quantum security", "API access", "Priority support", "Analytics dashboard"]
},
{
"name": "Business",
"price_monthly": "$499",
"licenses_per_month": 100000,
"features": ["Advanced quantum", "SLA 99.9%", "24/7 support", "Custom integrations", "White-label option"]
},
{
"name": "Enterprise",
"price_monthly": "Custom",
"licenses_per_month": 999999999,
"features": ["Unlimited licenses", "Dedicated support", "On-premise option", "Custom quantum config", "Legal SLA"]
}
]

KMS (Key Management Service)

M2M (machine-to-machine) endpoints for internal services to sign and verify data with post-quantum cryptography.

KMS Authentication: Authorization: Bearer svc_<token>

Sign Data

POST /api/v1/kms/sign

Headers:

Authorization: Bearer svc_seu_token
Content-Type: application/json

Request Body:

CampoTipoRequiredDefaultDescription
datastringData in Base64
key_idstringNo"default"Key ID
algorithmstringNo"ML-DSA-65"Signing algorithm

Algoritmos suportados:

AlgoritmoDescription
ML-DSA-65NIST post-quantum standard (default)
ML-DSA-87Higher security level
ED25519Classical, for compatibility

Response (200 OK):

{
"signature": "base64_encoded_signature...",
"key_id": "default",
"algorithm": "ML-DSA-65",
"signed_at": "2025-06-15T10:30:00Z",
"data_hash": "sha3_256_hash..."
}

Verify Signature

POST /api/v1/kms/verify

Headers:

Authorization: Bearer svc_seu_token
Content-Type: application/json

Request Body:

CampoTipoRequiredDescription
datastringOriginal data in Base64
signaturestringSignature in Base64
key_idstringNoKey ID (default: "default")
algorithmstringNoAlgorithm (default: "ML-DSA-65")

Response (200 OK):

{
"valid": true,
"key_id": "default",
"algorithm": "ML-DSA-65",
"verified_at": "2025-06-15T10:30:00Z",
"data_hash": "sha3_256_hash..."
}

Utilities

Health Check

GET /health

No authentication required.

{
"status": "healthy",
"service": "QuantumLock API",
"qcos_available": true,
"timestamp": "2025-06-15T10:30:00"
}

Root

GET /

No authentication required.

{
"service": "QuantumLock™ API",
"tagline": "Quantum-powered licensing as a service",
"version": "1.0.0",
"docs": "/docs",
"powered_by": "SoftQuantus + QCOS Autopilot",
"get_started": "https://portal.softquantus.com"
}

Error Codes

HTTP CodeDescription
200Success
201Resource created successfully
400Invalid request
401Invalid or inactive API Key
404Resource not found
429Rate limit exceeded
500Internal server error

Interactive Documentation

FormatoURL
Swagger UIhttps://quantumlock.softquantus.com/docs
ReDochttps://quantumlock.softquantus.com/redoc
OpenAPI JSONhttps://quantumlock.softquantus.com/openapi.json