API Reference
Complete REST API documentation for QuantaShield. Build quantum-safe applications with our powerful API.
Authentication
All API requests require authentication using an API key. Include your key in the Authorization header.
API Key Authentication
Include your API key in every request using the Bearer authentication scheme:
Authorization: Bearer YOUR_API_KEYGetting Your API Key
1. Sign up at dashboard.quantashield.io
2. Navigate to Settings → API Keys
3. Click "Generate New Key"
4. Copy and securely store your key
Important: Never commit API keys to version control or share them publicly. Use environment variables to store keys securely.
API Endpoints
Base URL: https://api.quantashield.io
/v1/encryptEncrypt data using quantum-safe algorithms
Request Body:
Response:
Example Request:
curl -X POST https://api.quantashield.io/v1/encrypt \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": "Sensitive customer information",
"algorithm": "ML-KEM-768"
}'/v1/decryptDecrypt previously encrypted data
Request Body:
Response:
Example Request:
curl -X POST https://api.quantashield.io/v1/decrypt \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"encrypted_data": "base64_encoded_string",
"key_id": "key_123456"
}'/v1/keys/generateGenerate a new encryption key
Request Body:
Response:
Example Request:
curl -X POST https://api.quantashield.io/v1/keys/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"algorithm": "ML-KEM-768",
"name": "customer-data-key",
"rotation_period": 90
}'/v1/keysList all encryption keys
Response:
Example Request:
curl -X GET "https://api.quantashield.io/v1/keys?page=1&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"/v1/keys/:key_id/rotateManually rotate an encryption key
Request Body:
Response:
Example Request:
curl -X POST https://api.quantashield.io/v1/keys/key_123/rotate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"re_encrypt_data": true}'/v1/audit/logsRetrieve audit logs for compliance
Response:
Example Request:
curl -X GET "https://api.quantashield.io/v1/audit/logs?start_date=2024-01-01&end_date=2024-12-31" \
-H "Authorization: Bearer YOUR_API_KEY"Error Codes
Standard HTTP response codes indicate the success or failure of API requests.
400 - Bad Request
Invalid request parameters or malformed JSON
401 - Unauthorized
Missing or invalid API key
403 - Forbidden
API key does not have required permissions
404 - Not Found
Requested resource does not exist
429 - Too Many Requests
Rate limit exceeded
500 - Internal Server Error
Server error - contact support if persists
503 - Service Unavailable
Temporary service disruption
Error Response Format
All error responses follow this structure:
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"details": "The 'algorithm' field is required",
"request_id": "req_abc123",
"timestamp": "2024-01-15T10:30:00Z"
}
}Rate Limits
API rate limits are enforced per organization to ensure fair usage and platform stability.
Rate Limit Headers
All responses include rate limit information in headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 987
X-RateLimit-Reset: 1705315800When rate limit is exceeded, you'll receive a 429 Too Many Requests response with a Retry-After header.
Official SDKs
Use our official SDKs to integrate QuantaShield in your preferred language.
Need Help?
Our developer support team is available to help you integrate QuantaShield into your applications.