BlocklogAI Compliance
API Reference

REST API Reference

Ingest logs, verify data integrity, manage incidents, and review human authorization workflows through the HTTPS API.

AuthenticationX-API-Key Header
Content Typeapplication/json
Base Pathhttps://api.blocklogsecurity.com/api/v1
POST/api/v1/logs

Ingest Log Event

Submit a single audit event payload to the cryptographic ledger. Computes SHA-256 hash and returns the generated UUID.

Request

Request
json
Headers:
X-API-Key: blk_live_xxxxxxxx
Content-Type: application/json

Body (JSON):
{
  "event_type": "CREDIT_DECISION",
  "data": {
    "applicant_id": "usr_9918",
    "credit_score": 742,
    "decision": "APPROVED",
    "model_version": "v2.1"
  },
  "source": "credit-service",
  "trace_id": "8f2a3c8d-1e0b-4a7f-9c4d-3b2a1e0f9a8b"
}

Response · 200 OK

Response
json
{
  "log_id": "c4e93b1f-7d4c-4e8b-a7f2-88cc2e8b0044",
  "company_id": "org_meridian",
  "event_type": "CREDIT_DECISION",
  "hash": "a3f9b2c1d4e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2",
  "created_at": "2024-07-28T09:14:32.102Z"
}
POST/api/v1/logs/batch

Batch Ingest Logs

Submit multiple events in a single HTTP request for high-throughput pipelines.

Request

Request
json
Body (JSON):
{
  "logs": [
    {
      "event_type": "TOOL_CALL",
      "data": { "tool": "calc_risk", "output": 0.04 }
    },
    {
      "event_type": "DECISION",
      "data": { "action": "EXECUTE", "status": "CONFIRMED" }
    }
  ]
}

Response · 200 OK

Response
json
{
  "ingested": 2,
  "log_ids": [
    "c4e93b1f-7d4c-4e8b-a7f2-88cc2e8b0044",
    "e4f3a2b1-c0d9-4e8f-7a6b-5c4d3b2a1e0f"
  ],
  "merkle_root": "sha256:b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4"
}
GET/api/v1/logs/{log_id}/verify

Verify Log Integrity

Validate SHA-256 hash chains and cryptographic signature for a specific log record.

Response · 200 OK

Response
json
{
  "log_id": "c4e93b1f-7d4c-4e8b-a7f2-88cc2e8b0044",
  "hash": "a3f9b2c1d4e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2",
  "chain_valid": true,
  "signature_valid": true,
  "verified_at": "2024-07-28T09:14:33.400Z"
}
POST/api/v1/forensics/replays

Create Forensic Replay Session

Initiate forensic timeline reconstruction and causal graph analysis for an execution trace.

Request

Request
json
Body (JSON):
{
  "trace_id": "8f2a3c8d-1e0b-4a7f-9c4d-3b2a1e0f9a8b",
  "metadata": { "reason": "CISO Q3 Audit" }
}

Response · 200 OK

Response
json
{
  "replay_id": "rep_9f2a3c8d1e0b",
  "trace_id": "8f2a3c8d-1e0b-4a7f-9c4d-3b2a1e0f9a8b",
  "status": "READY",
  "event_count": 14,
  "created_at": "2024-07-28T09:15:00.000Z"
}
GET/api/v1/forensics/replays/{replay_id}/root-cause

Forensic Root Cause Analysis

Analyze causal dependencies across tool calls, stale inputs, and policy denials to isolate anomalies.

Response · 200 OK

Response
json
{
  "detected": true,
  "root_cause_type": "STALE_CONTEXT",
  "description": "Execution relied on stale market data at path 'market.feed'.",
  "confidence": 0.95,
  "remediation": "Refresh market data feed before executing decision."
}
POST/api/v1/hitl/reject

Human Override Rejection

Record and cryptographically seal human review decisions and overrides.

Request

Request
json
Body (JSON):
{
  "decision_id": "dec_88192a",
  "reviewer": "cro@bank.com",
  "rejection_reason": "Applicant debt-to-income ratio exceeds risk policy"
}

Response · 200 OK

Response
json
{
  "override_id": "ovr_3b2a1e0f",
  "status": "REJECTED",
  "timestamp": "2024-07-28T09:16:12.000Z",
  "signature": "ed25519:7f9a8b...3c2d1e"
}