{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/infinihash-com/json-schema/infinihash-com-audit-event-schema.json",
  "title": "AuditEvent",
  "description": "An append-only audit log entry (cannot be amended or deleted through the API).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/infinihash-com-audit-api-openapi.yml#/components/schemas/AuditEvent",
  "type": "object",
  "required": [
    "id",
    "createdAt",
    "action"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "apiKeyId": {
      "type": [
        "string",
        "null"
      ]
    },
    "submissionId": {
      "type": [
        "string",
        "null"
      ]
    },
    "documentId": {
      "type": [
        "string",
        "null"
      ]
    },
    "action": {
      "type": "string",
      "description": "e.g. document.upload, biometric.check, kyc.run, legal_hold.set, retention.purge."
    },
    "provider": {
      "type": [
        "string",
        "null"
      ]
    },
    "model": {
      "type": [
        "string",
        "null"
      ]
    },
    "hash": {
      "type": [
        "string",
        "null"
      ]
    },
    "costUsd": {
      "type": [
        "number",
        "null"
      ]
    },
    "latencyMs": {
      "type": [
        "integer",
        "null"
      ]
    },
    "meta": {
      "type": [
        "string",
        "null"
      ],
      "description": "JSON-encoded context blob (a string)."
    }
  }
}