API Reference
Complete v2 REST API documentation. All endpoints are under https://api.quantaseal.io/api/v2/
https://api.quantaseal.ioVersion:v2Format:JSONAuthentication#
Use the X-API-Key header for API key authentication. JWT tokens from /auth/login use Authorization: Bearer.
X-API-Key: qs_live_your_key_here/api/v2/auth/loginNoneExchange email + password for a JWT access token (30 min) and refresh token (7 days). Sets httpOnly cookies.
Request Body
Response
Example
curl -X POST https://api.quantaseal.io/api/v2/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "password": "your_password"}'/api/v2/auth/registerNoneCreate a new user and tenant. Starts a 14-day free trial. Sends verification email via Resend.
Request Body
Response
Example
curl -X POST https://api.quantaseal.io/api/v2/auth/register \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "password": "strong_pass", "tenant_name": "Acme Corp"}'/api/v2/auth/refreshCookie (refreshToken)Exchange a valid refresh token cookie for a new access token. Called automatically by the SDK on 401.
Response
Example
curl -X POST https://api.quantaseal.io/api/v2/auth/refresh \
-H "Cookie: refreshToken=<your_refresh_token>"Vault API#
Store and retrieve credentials with 3-layer PQC encryption: ML-KEM-768 → AWS KMS-wrap → AES-256-GCM. All vault endpoints return a uniform 403 on any error to prevent credential enumeration.
/api/v2/vault/sealRequiredStore a credential with 3-layer PQC encryption. Returns credential_id.
Request Body
Response
Example
curl -X POST https://api.quantaseal.io/api/v2/vault/seal \
-H "X-API-Key: qs_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "stripe-production-key",
"credential_type": "api_key",
"values": {"key": "sk_live_abc123"},
"ttl_days": 90
}'/api/v2/vault/listRequiredList all vault entries for the authenticated tenant. Returns metadata only - no plaintext values.
Response
Example
curl https://api.quantaseal.io/api/v2/vault/list \
-H "X-API-Key: qs_live_..."/api/v2/vault/{credential_id}RequiredUnseal (decrypt and retrieve) a credential. Verifies ML-DSA-65 + HMAC-SHA-512 before decryption. Returns uniform 403 on any error.
Response
Example
curl https://api.quantaseal.io/api/v2/vault/cred_abc123 \
-H "X-API-Key: qs_live_..."/api/v2/vault/rotate/{credential_id}RequiredRe-encrypt a vault entry with a new ML-KEM-768 key pair. Old ciphertext is securely deleted.
Response
Example
curl -X POST https://api.quantaseal.io/api/v2/vault/rotate/cred_abc123 \
-H "X-API-Key: qs_live_..."/api/v2/vault/{credential_id}RequiredPermanently delete a vault entry and its ciphertext. Logged to the immutable audit chain.
Response
Example
curl -X DELETE https://api.quantaseal.io/api/v2/vault/cred_abc123 \
-H "X-API-Key: qs_live_..."Encryption API#
Encrypt and sign arbitrary data. Hybrid mode is mandatory: ML-KEM-768 encap → HKDF-SHA-512 → AES-256-GCM. Both signatures (ML-DSA-65 + HMAC-SHA-512) are verified with bitwise & - neither short-circuits.
/api/v2/encryption/encryptRequiredEncrypt arbitrary data using ML-KEM-768 + AES-256-GCM hybrid encryption (NIST FIPS 203).
Request Body
Response
Example
curl -X POST https://api.quantaseal.io/api/v2/encryption/encrypt \
-H "X-API-Key: qs_live_..." \
-H "Content-Type: application/json" \
-d '{"data": "sensitive customer PII", "algorithm": "ML-KEM-768"}'/api/v2/encryption/decryptRequiredDecrypt a ciphertext envelope produced by /encrypt. Signature verification runs before decryption.
Request Body
Response
Example
curl -X POST https://api.quantaseal.io/api/v2/encryption/decrypt \
-H "X-API-Key: qs_live_..." \
-H "Content-Type: application/json" \
-d '{"ciphertext_kem": "...", "ciphertext_data": "...", "nonce": "..."}'/api/v2/encryption/signRequiredSign data with ML-DSA-65 (NIST FIPS 204) + HMAC-SHA-512. Returns both signatures - both must be present.
Request Body
Response
Example
curl -X POST https://api.quantaseal.io/api/v2/encryption/sign \
-H "X-API-Key: qs_live_..." \
-H "Content-Type: application/json" \
-d '{"data": "payload to sign"}'/api/v2/encryption/verifyRequiredVerify ML-DSA-65 + HMAC-SHA-512 signatures. Both must pass - verified with bitwise & (no short-circuit).
Request Body
Response
Example
curl -X POST https://api.quantaseal.io/api/v2/encryption/verify \
-H "X-API-Key: qs_live_..." \
-H "Content-Type: application/json" \
-d '{"data": "payload", "pqc_signature": "...", "hmac_signature": "..."}'Compliance API#
Generate compliance reports from the immutable audit hash chain. Supported frameworks: soc2, iso27001, pci_dss, hipaa, gdpr, nist_csf, fedramp, apra, nist_800_53
/api/v2/compliance/score?framework=soc2RequiredGet the compliance score (0–100) for a framework. Reads from the live audit hash chain.
Response
Example
curl "https://api.quantaseal.io/api/v2/compliance/score?framework=soc2" \
-H "X-API-Key: qs_live_..."/api/v2/compliance/report?framework=soc2RequiredGenerate a PDF compliance report with evidence citations. Returns a signed S3 URL (1h expiry).
Response
Example
curl "https://api.quantaseal.io/api/v2/compliance/report?framework=soc2" \
-H "X-API-Key: qs_live_..."Audit API#
Query the immutable audit log. Every entry is ML-DSA-65 signed and chained with SHA3-256 hashes. Supports filtering by event type, user, and time range.
/api/v2/audit/logsRequiredRetrieve audit log entries from the SHA3-256 hash chain. Immutable - every entry is ML-DSA-65 signed.
Response
Example
curl "https://api.quantaseal.io/api/v2/audit/logs?event_type=CREDENTIAL_UNSEALED&hours=24" \
-H "X-API-Key: qs_live_..."Error Codes#
Standard HTTP response codes. Error details are never included in response bodies - only generic messages. This prevents information leakage.
| Code | Name | Description |
|---|---|---|
400 | Bad Request | Invalid request parameters or malformed JSON |
401 | Unauthorized | Missing or invalid API key / expired access token |
403 | Forbidden | Insufficient permissions - vault endpoints always return 403 to prevent enumeration |
422 | Unprocessable Entity | Request body failed Pydantic validation - check field types |
429 | Too Many Requests | Rate limit exceeded - check Retry-After header (jittered) |
500 | Internal Server Error | Server error - details are never included in the response body |
503 | Service Unavailable | Temporary disruption - retry with exponential backoff |
Error response envelope:
{
"success": false,
"error": {
"code": 403,
"message": "Access denied",
"request_id": "req_abc123",
"timestamp": "2026-05-24T10:30:00Z"
}
}Rate Limits#
Rate limits are enforced per tenant per minute. Responses include rate limit headers. On 429, a jittered Retry-After header is present.
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4987
X-RateLimit-Reset: 1748080800
Retry-After: 12 # jittered - present only on 429