{
  "info": {
    "name": "Infinihash KYT API",
    "_postman_id": "infinihash-kyt-v2",
    "description": "Full API reference for the Infinihash KYT platform.\n\nBase URL: https://kyt.infinihash.com\nAuth: X-API-Key header on every request.\n\nSet up your Postman environment with two variables:\n  • base_url   → https://kyt.infinihash.com\n  • kyt_api_key → your key from https://kyt.infinihash.com/kyt/admin\n\nFolders\n-------\n1. Screening      — Screen wallets, poll for results, regenerate narratives\n2. Cases          — Compliance case management + SAR workflow\n3. Webhooks       — Register, update, test, and delete webhook endpoints\n4. API Keys       — Issue, list, and revoke programmatic API keys\n5. Wallet         — Detailed risk profiles and transaction flow reports\n6. Bulk           — Batch-screen hundreds of addresses in one call\n7. Travel Rule    — FATF Travel Rule compliance checks\n8. Intelligence   — Query the Infinihash label graph directly\n9. Health         — Liveness check",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "version": "2.0.0"
  },
  "variable": [
    { "key": "base_url",    "value": "https://kyt.infinihash.com", "type": "string" },
    { "key": "kyt_api_key", "value": "REPLACE_WITH_YOUR_KEY",       "type": "string" },
    { "key": "screening_id","value": "",                             "type": "string" },
    { "key": "case_id",     "value": "",                             "type": "string" },
    { "key": "webhook_id",  "value": "",                             "type": "string" },
    { "key": "key_id",      "value": "",                             "type": "string" },
    { "key": "job_id",      "value": "",                             "type": "string" },
    { "key": "address",     "value": "0x722122dF12D4e14e13Ac3b6895a86e84145b6967", "type": "string" },
    { "key": "chain",       "value": "ethereum",                     "type": "string" }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      { "key": "key",   "value": "X-API-Key",       "type": "string" },
      { "key": "value", "value": "{{kyt_api_key}}",  "type": "string" },
      { "key": "in",    "value": "header",            "type": "string" }
    ]
  },
  "item": [

    {
      "name": "1. Screening",
      "description": "Screen wallet addresses for sanctions exposure, mixer activity, and risk signals.\n\nScreenings are asynchronous — POST returns immediately with status='pending'. Poll GET /:id until status='complete' (typically under 2 seconds for cached addresses).\n\nWorkflow:\n  1. POST /api/v1/screen → save screening_id\n  2. GET  /api/v1/screen/:id → check status\n  3. If risk_level is 'high' or 'critical' → open a Case",
      "item": [
        {
          "name": "Screen a wallet address",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const body = pm.response.json();",
                  "if (body && body.id) {",
                  "  pm.collectionVariables.set('screening_id', body.id);",
                  "  console.log('screening_id saved:', body.id);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/v1/screen",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "screen"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"type\": \"wallet\",\n  \"value\": \"{{address}}\",\n  \"chain\": \"{{chain}}\"\n}"
            },
            "description": "Submit a wallet address for screening.\n\nReturns immediately with status='pending'. The risk_score and risk_level fields will be null until status='complete'. Auto-saves screening_id to collection variables."
          }
        },
        {
          "name": "Get screening by ID",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/screen/{{screening_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "screen", "{{screening_id}}"]
            },
            "description": "Poll until status='complete'.\n\nKey response fields:\n  • risk_score  — 0–100 (100 = highest risk)\n  • risk_level  — low | medium | high | critical\n  • action      — recommended compliance action\n  • entity_name — known entity label (e.g. 'Tornado Cash')\n  • flags.events — list of specific risk signals found\n  • narrative   — AI-generated compliance narrative"
          }
        },
        {
          "name": "Address screening frequency",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/screen/address/{{address}}/frequency?chain={{chain}}",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "screen", "address", "{{address}}", "frequency"],
              "query": [{ "key": "chain", "value": "{{chain}}" }]
            },
            "description": "Return how many times this address has been screened across all tenants.\n\nHigh query frequency is itself a risk signal — known bad actors are queried by many institutions."
          }
        },
        {
          "name": "Regenerate AI narrative",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{base_url}}/api/v1/screen/{{screening_id}}/narrative",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "screen", "{{screening_id}}", "narrative"]
            },
            "description": "Re-generate the AI compliance narrative for a completed screening.\n\nUse after new intelligence has been ingested, or when you want a refreshed narrative for a report."
          }
        }
      ]
    },

    {
      "name": "2. Cases",
      "description": "Compliance case management and SAR workflow.\n\nCases track high-risk addresses through your internal review process and generate FinCEN-ready SAR drafts automatically.\n\nTypical workflow:\n  1. create()        — open a case for a flagged address\n  2. addNote()       — record investigator findings\n  3. escalateSar()   — trigger SAR draft generation\n  4. sarPdf()        — download the draft for review\n  5. markSarFiled()  — close the loop with BSA ID",
      "item": [
        {
          "name": "Create case",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const body = pm.response.json();",
                  "if (body && body.id) {",
                  "  pm.collectionVariables.set('case_id', body.id);",
                  "  console.log('case_id saved:', body.id);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/v1/cases",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "cases"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"chain\": \"{{chain}}\",\n  \"address\": \"{{address}}\",\n  \"notes\": \"Opened after high-risk screening. Suspected mixer exposure.\"\n}"
            },
            "description": "Open a new compliance case. Auto-saves case_id to collection variables."
          }
        },
        {
          "name": "List cases",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/cases",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "cases"]
            },
            "description": "Returns all cases for your organisation, newest first."
          }
        },
        {
          "name": "Get case",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/cases/{{case_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "cases", "{{case_id}}"]
            },
            "description": "Fetch a case with full note history and current SAR stage."
          }
        },
        {
          "name": "Add case note",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/v1/cases/{{case_id}}/notes",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "cases", "{{case_id}}", "notes"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"author\": \"compliance-analyst\",\n  \"note\": \"Confirmed mixer exposure — 3.2 ETH routed through Tornado Cash. Escalating to SAR.\"\n}"
            },
            "description": "Append a timestamped investigator note to the case audit trail."
          }
        },
        {
          "name": "Escalate to SAR workflow",
          "request": {
            "method": "PATCH",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/v1/cases/{{case_id}}/escalate-sar",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "cases", "{{case_id}}", "escalate-sar"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"deadline_days\": 30\n}"
            },
            "description": "Sets sar_stage to 'in_progress' and records the filing deadline (30 days per FinCEN rules).\n\nThe system generates a draft SAR PDF immediately. Download it with 'Download SAR PDF'."
          }
        },
        {
          "name": "Download SAR PDF",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/cases/{{case_id}}/sar",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "cases", "{{case_id}}", "sar"]
            },
            "description": "Download the FinCEN SAR draft as a PDF.\n\nIn Postman: click 'Send and Download' to save the file."
          }
        },
        {
          "name": "Export FinCEN JSON template",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/cases/{{case_id}}/sar/export",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "cases", "{{case_id}}", "sar", "export"]
            },
            "description": "Read-only FinCEN-structured JSON export.\n\nMaps to FinCEN SAR form fields. Your compliance team must add subject personal information before filing — the API never stores PII."
          }
        },
        {
          "name": "Mark SAR filed",
          "request": {
            "method": "PATCH",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/v1/cases/{{case_id}}/mark-sar-filed",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "cases", "{{case_id}}", "mark-sar-filed"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"bsa_id\": \"31000000000000\"\n}"
            },
            "description": "Close the SAR workflow for this case after filing with FinCEN.\n\nRecord the BSA ID assigned by FinCEN — it's required for your audit trail."
          }
        }
      ]
    },

    {
      "name": "3. Webhooks",
      "description": "Register HTTPS endpoints to receive real-time push notifications when screening events occur.\n\nAll payloads are signed with HMAC-SHA256. Verify the X-KYT-Signature header on receipt:\n  expected = HMAC-SHA256(secret, raw_body)\n\nSupported events:\n  • high_risk_screening\n  • case_escalated\n  • sar_deadline_approaching\n  • sar_filed\n  • bulk_complete",
      "item": [
        {
          "name": "List supported events",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/webhooks/events",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "webhooks", "events"]
            },
            "description": "Return the canonical list of event types available for subscription."
          }
        },
        {
          "name": "List webhooks",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/webhooks",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "webhooks"]
            }
          }
        },
        {
          "name": "Create webhook",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const body = pm.response.json();",
                  "if (body && body.id) {",
                  "  pm.collectionVariables.set('webhook_id', body.id);",
                  "  console.log('webhook_id saved:', body.id);",
                  "  if (body.secret) console.log('SAVE THIS SECRET:', body.secret);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/v1/webhooks",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "webhooks"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://your-server.example.com/hooks/kyt\",\n  \"events\": [\"high_risk_screening\", \"case_escalated\"],\n  \"description\": \"Production compliance alerts\"\n}"
            },
            "description": "Register a new HTTPS endpoint.\n\nThe response includes a `secret` field — this is shown ONCE. Copy it and store it securely for HMAC signature verification."
          }
        },
        {
          "name": "Update webhook",
          "request": {
            "method": "PATCH",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/v1/webhooks/{{webhook_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "webhooks", "{{webhook_id}}"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"active\": true,\n  \"events\": [\"high_risk_screening\", \"case_escalated\", \"sar_deadline_approaching\"]\n}"
            },
            "description": "Partial update — only send the fields you want to change."
          }
        },
        {
          "name": "Test webhook",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{base_url}}/api/v1/webhooks/{{webhook_id}}/test",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "webhooks", "{{webhook_id}}", "test"]
            },
            "description": "Send a synthetic test payload to validate your webhook receiver.\n\nReturns HTTP 202 and delivers the test event asynchronously."
          }
        },
        {
          "name": "Delete webhook",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{base_url}}/api/v1/webhooks/{{webhook_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "webhooks", "{{webhook_id}}"]
            },
            "description": "Permanently delete a webhook endpoint. Returns HTTP 204."
          }
        }
      ]
    },

    {
      "name": "4. API Keys",
      "description": "Issue, list, and revoke programmatic API keys for your organisation.\n\nOnly your primary key (issued via the dashboard) can manage other keys.\n\nAPI key format: ih_kyt_<random>\nAuth header:    X-API-Key: ih_kyt_...",
      "item": [
        {
          "name": "List API keys",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/keys",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "keys"]
            },
            "description": "Returns all active keys for your organisation. Secrets are redacted — only the prefix is shown."
          }
        },
        {
          "name": "Create API key",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const body = pm.response.json();",
                  "if (body && body.id) {",
                  "  pm.collectionVariables.set('key_id', body.id);",
                  "  console.log('key_id saved:', body.id);",
                  "  if (body.key) console.log('SAVE THIS KEY:', body.key);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/v1/keys",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "keys"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"production-server\"\n}"
            },
            "description": "Issue a new API key.\n\nThe `key` field in the response is shown ONCE — store it securely. It cannot be retrieved again."
          }
        },
        {
          "name": "Get usage & quota",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/keys/usage",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "keys", "usage"]
            },
            "description": "Return screening usage and quota for the current billing period.\n\nUse this to monitor your consumption and anticipate overages."
          }
        },
        {
          "name": "Revoke API key",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{base_url}}/api/v1/keys/{{key_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "keys", "{{key_id}}"]
            },
            "description": "Permanently revoke a key. Any in-flight requests using this key will fail immediately. Returns HTTP 204."
          }
        }
      ]
    },

    {
      "name": "5. Wallet Intelligence",
      "description": "Richer wallet analysis beyond a point-in-time screening.\n\n• risk   — Aggregated risk profile combining all screenings, labels, and cluster data\n• report — Full transaction-flow breakdown with counterparty categories",
      "item": [
        {
          "name": "Wallet risk profile",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/wallet/{{address}}/risk?chain={{chain}}",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "wallet", "{{address}}", "risk"],
              "query": [{ "key": "chain", "value": "{{chain}}" }]
            },
            "description": "Return the current aggregated risk profile for a wallet.\n\nResponse includes:\n  • risk_score / risk_level\n  • entity_name (e.g. 'Tornado Cash', 'Binance')\n  • cluster_size — number of addresses in the same cluster\n  • exposure     — breakdown by category (sanctions, mixer, exchange, darknet, etc.)"
          }
        },
        {
          "name": "Wallet transaction report",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/wallet/{{address}}/report?chain={{chain}}",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "wallet", "{{address}}", "report"],
              "query": [{ "key": "chain", "value": "{{chain}}" }]
            },
            "description": "Full transaction-flow report including inbound/outbound volume, counterparty category breakdown, and a list of individually flagged transactions."
          }
        }
      ]
    },

    {
      "name": "6. Bulk Screening",
      "description": "Screen hundreds of addresses in a single API call.\n\nWorkflow:\n  1. POST /api/v1/bulk   — submit job, save job_id\n  2. GET  /api/v1/bulk/status — poll until status='complete'\n  3. GET  /api/v1/bulk/export/:job_id — download results\n\nIdeal for: onboarding sweeps, portfolio re-screening, sanctions list updates.",
      "item": [
        {
          "name": "Submit bulk screening job",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "const body = pm.response.json();",
                  "if (body && body.job_id) {",
                  "  pm.collectionVariables.set('job_id', body.job_id);",
                  "  console.log('job_id saved:', body.job_id);",
                  "}"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/v1/bulk",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "bulk"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"addresses\": [\n    { \"address\": \"0x722122dF12D4e14e13Ac3b6895a86e84145b6967\", \"chain\": \"ethereum\" },\n    { \"address\": \"0xd90e2f925DA726b50C4Ed8D0Fb90Ad053324F31b\", \"chain\": \"ethereum\" },\n    { \"address\": \"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq\", \"chain\": \"bitcoin\" }\n  ]\n}"
            },
            "description": "Submit a batch of addresses for asynchronous screening.\n\nReturns job_id and poll_url. Auto-saves job_id to collection variables."
          }
        },
        {
          "name": "Poll bulk job status",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/bulk/status",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "bulk", "status"]
            },
            "description": "Returns status for the most recent bulk job: queued | processing | complete | error.\n\nPoll every 2 seconds until status='complete'."
          }
        },
        {
          "name": "Export bulk results",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/bulk/export/{{job_id}}",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "bulk", "export", "{{job_id}}"]
            },
            "description": "Download results for a completed bulk job.\n\nResponse includes a `results` array (one screening per address) and a `summary` with counts by risk_level."
          }
        }
      ]
    },

    {
      "name": "7. Travel Rule",
      "description": "FATF Travel Rule compliance checks.\n\nDetermine whether counterparty addresses belong to regulated VASPs and whether travel rule information must be shared on a proposed transfer.\n\nThe $3,000 USD threshold applies in most jurisdictions — check identifyVasp first to confirm the counterparty is a regulated entity.",
      "item": [
        {
          "name": "Travel Rule check",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "url": {
              "raw": "{{base_url}}/api/v1/travel-rule/check",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "travel-rule", "check"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"originator\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n  \"beneficiary\": \"0x722122dF12D4e14e13Ac3b6895a86e84145b6967\",\n  \"amount_usd\": 15000,\n  \"chain\": \"ethereum\"\n}"
            },
            "description": "Performs a full Travel Rule compliance check for a proposed transfer.\n\nResponse includes:\n  • travel_rule_required — whether the rule applies\n  • originator_vasp / beneficiary_vasp — VASP identification results\n  • threshold_usd — applicable threshold for this jurisdiction\n  • recommended_action — plain-English guidance"
          }
        },
        {
          "name": "Identify VASP",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/travel-rule/vasp/{{address}}?chain={{chain}}",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "travel-rule", "vasp", "{{address}}"],
              "query": [{ "key": "chain", "value": "{{chain}}" }]
            },
            "description": "Identify whether a wallet address belongs to a known VASP.\n\nResponse includes name, type, jurisdiction, and whether the VASP is regulated in its home country."
          }
        }
      ]
    },

    {
      "name": "8. Intelligence",
      "description": "Query the Infinihash label graph directly.\n\nThe intelligence database contains 700k+ labelled addresses across 10+ chains, screened against 11 curated sources (OFAC SDN plus 10 attribution and label sources).\n\nUse these endpoints to build internal dashboards or enrich your own risk models.",
      "item": [
        {
          "name": "Database statistics",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/stats",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "stats"]
            },
            "description": "Aggregate statistics: total label count, chain breakdown, data freshness timestamp."
          }
        },
        {
          "name": "Cross-chain address lookup",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/intel/lookup/{{address}}",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "intel", "lookup", "{{address}}"]
            },
            "description": "Returns all labels, entity associations, and risk signals for an address across every chain in the database.\n\nUseful for quick ad-hoc lookups without consuming a screening credit."
          }
        },
        {
          "name": "Recent screenings",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/intel/recent-screenings",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "intel", "recent-screenings"]
            },
            "description": "Returns the last 50 screenings submitted by your organisation. Useful for activity monitoring and audit logs."
          }
        }
      ]
    },

    {
      "name": "9. Health",
      "item": [
        {
          "name": "Liveness check",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/health",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "health"]
            },
            "description": "Returns { \"status\": \"ok\" } when the API is healthy.\n\nUse in monitoring integrations or deployment pipelines."
          }
        }
      ]
    }

  ]
}
