{
  "id": "webhooks",
  "name": "Webhooks",
  "description": "Authenticated inbound webhooks that bind external automation to OpenClaw TaskFlows.",
  "configSchema": {
    "type": "object",
    "additionalProperties": false,
    "$defs": {
      "secretRef": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "source": {
            "type": "string",
            "enum": ["env", "file", "exec"]
          },
          "provider": { "type": "string" },
          "id": { "type": "string" }
        },
        "required": ["source", "provider", "id"]
      },
      "secretInput": {
        "anyOf": [{ "type": "string", "minLength": 1 }, { "$ref": "#/$defs/secretRef" }]
      },
      "route": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "enabled": { "type": "boolean" },
          "path": { "type": "string", "minLength": 1 },
          "sessionKey": { "type": "string", "minLength": 1 },
          "secret": { "$ref": "#/$defs/secretInput" },
          "controllerId": { "type": "string", "minLength": 1 },
          "description": { "type": "string" }
        },
        "required": ["sessionKey", "secret"]
      }
    },
    "properties": {
      "routes": {
        "type": "object",
        "additionalProperties": {
          "$ref": "#/$defs/route"
        }
      }
    }
  }
}
