API Documentation

API Documentation

500+ endpoints for post-quantum cryptography and enterprise security

Getting Started

1. Get API Key

Sign up for a free account to receive your API key with granular permissions for endpoint access.

2. Choose Algorithm

Select from 28 encryption algorithms including NIST-standardized ML-KEM-1024, ML-DSA-87, and hybrid implementations.

3. Make Request

Send HTTP requests to our REST API endpoints at api.pqcrypta.com with your API key in the header.

Core API Endpoints

Cryptography (100+ endpoints)

  • /keys/generate – Generate cryptographic keys
  • /encrypt – Encrypt data with PQC
  • /decrypt – Decrypt encrypted data
  • /sign – Create digital signatures
  • /verify – Verify digital signatures
  • /compress – ML-enhanced compression
  • /decompress – Data decompression

Authentication (50+ endpoints)

  • /auth/login – User authentication
  • /auth/register – Account creation
  • /auth/2fa/setup – Enable 2FA (TOTP, SMS, Email, WebAuthn)
  • /auth/2fa/verify – Verify 2FA codes
  • /auth/keys – API key management
  • /auth/oauth – OAuth integration
  • /auth/session – Session management

Analytics (40+ endpoints)

  • /analytics – Dashboard overview
  • /analytics/kpi – Key performance indicators
  • /analytics/usage – API usage statistics
  • /analytics/security – Security metrics
  • /analytics/performance – Performance data
  • /analytics/track – Event tracking
  • /analytics/export – Data export

Blockchain (30+ endpoints)

  • /blocks – Blockchain operations
  • /blocks/mine – Mine new blocks
  • /contracts – Smart contracts
  • /contracts/deploy – Deploy contracts
  • /contracts/execute – Execute contracts
  • /contracts/zk – Zero-knowledge proofs

Batch Processing (20+ endpoints)

  • /batch/jobs – Manage batch jobs
  • /batch/keys/generate – Bulk key generation
  • /batch/encrypt – Bulk encryption
  • /batch/status – Job status tracking
  • /batch/cancel – Cancel batch operations
  • /batch/metrics – Performance metrics

Compliance (25+ endpoints)

  • /compliance/audit – Audit trails
  • /compliance/gdpr – GDPR compliance
  • /compliance/hipaa – HIPAA compliance
  • /compliance/export – Compliance reports
  • /compliance/certificates – Compliance certificates
  • /compliance/fips – FIPS validation

Example Requests

Generate Keys (ML-KEM-1024)

curl -X POST https://api.pqcrypta.com/keys/generate \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "algorithm": "ml-kem-1024",
    "format": "pem"
  }'

Response

{
  "success": true,
  "algorithm": "ml-kem-1024",
  "keys": {
    "public_key": "-----BEGIN PUBLIC KEY-----...",
    "private_key": "-----BEGIN PRIVATE KEY-----..."
  },
  "metadata": {
    "key_exchange": "ML-KEM-1024",
    "encryption": "AES-256-GCM",
    "security_level": 5,
    "quantum_resistant": true
  }
}

Encrypt Data (Hybrid Mode)

curl -X POST https://api.pqcrypta.com/encrypt \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "algorithm": "hybrid",
    "data": "SGVsbG8sIFdvcmxkIQ==",
    "compression": true,
    "keys": {
      "public_key": "..."
    }
  }'

Response

{
  "success": true,
  "algorithm": "hybrid",
  "encrypted_data": "base64-encoded-ciphertext...",
  "metadata": {
    "encryption": "AES-256-GCM",
    "key_exchange": "ML-KEM-1024 + X25519",
    "signature": "ML-DSA-87 + Ed25519",
    "compression": "zstd",
    "original_size": 13,
    "encrypted_size": 245
  }
}

Batch Key Generation

curl -X POST https://api.pqcrypta.com/batch/keys/generate \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "algorithm": "ml-kem-1024",
    "count": 100,
    "callback_url": "https://yourapp.com/webhook"
  }'

Response

{
  "success": true,
  "job_id": "batch-12345-6789",
  "status": "processing",
  "progress": {
    "total": 100,
    "completed": 0,
    "failed": 0
  },
  "estimated_completion": "2025-12-30T15:30:00Z"
}

API Features

High Performance

HTTP/3 + QUIC

  • 40% faster than HTTP/2
  • 0-RTT connection resumption
  • Connection pooling
  • SIMD acceleration

Enterprise Security

Multi-layered Protection

  • TLS 1.3 with PQC
  • API key authentication
  • Rate limiting
  • Audit logging

Reliability

99.99% Uptime SLA

  • Distributed infrastructure
  • Automatic failover
  • Health monitoring
  • 24/7 support