{
  "name": "TokenVerify - Lead Qualification & Fraud Defense Pipeline",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "lead-signup-hook",
        "responseMode": "responseNode",
        "options": {}
      },
      "name": "Webhook Lead Inbound",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [240, 300]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://tokenverifyapi.com/v1/verify/b2b-lead",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer tv_live_YOUR_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            { "name": "email", "value": "={{ $json.body.email }}" },
            { "name": "tax_id", "value": "={{ $json.body.tax_id }}" },
            { "name": "phone", "value": "={{ $json.body.phone }}" }
          ]
        },
        "options": {}
      },
      "name": "TokenVerify Sub-50ms Gateway",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [460, 300]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.verdict }}",
              "value2": "ALLOW"
            }
          ]
        }
      },
      "name": "Is Verified B2B Lead?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [680, 300]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { \"success\": true, \"status\": \"APPROVED\", \"trust_score\": $json.trust_score } }}",
        "options": {
          "responseCode": 200
        }
      },
      "name": "Approve Lead & Route to CRM",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [920, 200]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { \"error\": \"FRAUD_REJECTED\", \"message\": \"Disposable email or high-risk carrier detected.\" } }}",
        "options": {
          "responseCode": 400
        }
      },
      "name": "Block Disposable / Bot Signup",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [920, 420]
    }
  ],
  "connections": {
    "Webhook Lead Inbound": {
      "main": [[{ "node": "TokenVerify Sub-50ms Gateway", "type": "main", "index": 0 }]]
    },
    "TokenVerify Sub-50ms Gateway": {
      "main": [[{ "node": "Is Verified B2B Lead?", "type": "main", "index": 0 }]]
    },
    "Is Verified B2B Lead?": {
      "main": [
        [{ "node": "Approve Lead & Route to CRM", "type": "main", "index": 0 }],
        [{ "node": "Block Disposable / Bot Signup", "type": "main", "index": 0 }]
      ]
    }
  }
}
