{
  "name": "Contrax",
  "description": "Vendor renewal tracker — webhooks for reminders, workflow events, and extraction completion.",
  "homepage": "https://usecontrax.com",
  "logo": "https://usecontrax.com/favicon.ico",
  "version": "1.0.0",
  "platformVersion": "1.0.0",
  "authentication": {
    "type": "custom",
    "fields": [
      {
        "key": "webhook_url",
        "label": "Contrax HTTPS webhook URL",
        "type": "string",
        "required": true,
        "helpText": "Set in Contrax Workspace → Custom HTTPS webhook. Use the Catch Hook URL from Zapier as the Contrax webhook URL, or use Webhooks by Zapier as the action and Contrax outbound events as triggers via your deployed webhook endpoint."
      },
      {
        "key": "webhook_secret",
        "label": "Webhook secret (optional)",
        "type": "string",
        "required": false,
        "helpText": "Matches X-Contrax-Signature when configured in workspace settings."
      }
    ],
    "test": {
      "url": "{{webhook_url}}",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "contrax": { "eventVersion": 1, "event": "zapier.ping" },
        "message": "Contrax Zapier connection test"
      }
    }
  },
  "triggers": [
    {
      "key": "renewal_reminder",
      "name": "Renewal Reminder",
      "description": "Fires when Contrax sends a scheduled renewal or opt-out reminder.",
      "operation": {
        "type": "hook",
        "performSubscribe": {
          "url": "{{webhook_url}}",
          "method": "POST"
        },
        "performUnsubscribe": {},
        "performList": {},
        "perform": {},
        "inputFields": []
      },
      "sample": {
        "contrax": { "eventVersion": 1, "event": "renewal.reminder" },
        "contractNumber": "MSA-2024-001",
        "daysUntil": 30,
        "kind": "expiration"
      }
    },
    {
      "key": "workflow_started",
      "name": "Renewal Plan Started",
      "description": "Fires when a renewal workflow moves to in_progress.",
      "operation": {
        "type": "hook",
        "performSubscribe": {},
        "performUnsubscribe": {},
        "performList": {},
        "perform": {},
        "inputFields": []
      },
      "sample": {
        "contrax": { "eventVersion": 1, "event": "renewal.workflow_started" },
        "contractNumber": "MSA-2024-001"
      }
    },
    {
      "key": "analysis_completed",
      "name": "Vendor Extraction Completed",
      "description": "Fires when a vendor extraction pass completes.",
      "operation": {
        "type": "hook",
        "performSubscribe": {},
        "performUnsubscribe": {},
        "performList": {},
        "perform": {},
        "inputFields": []
      },
      "sample": {
        "contrax": { "eventVersion": 1, "event": "contract.analysis_completed" },
        "contractNumber": "MSA-2024-001",
        "severityHighest": "medium"
      }
    }
  ],
  "creates": [],
  "searches": []
}
