{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/rachio/main/json-schema/rachio-get-webhook-response-schema.json",
  "title": "GetWebhookResponse",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rachio-webhooks-openapi.yml#/components/schemas/GetWebhookResponse",
  "type": "object",
  "properties": {
    "webhook": {
      "$ref": "#/$defs/Webhook"
    }
  },
  "$defs": {
    "ResourceId": {
      "type": "object",
      "properties": {
        "valve_id": {
          "type": "string"
        },
        "irrigation_controller_id": {
          "type": "string"
        },
        "program_id": {
          "type": "string"
        },
        "lighting_controller_id": {
          "type": "string"
        }
      }
    },
    "Webhook": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "external_id": {
          "type": "string"
        },
        "resource_id": {
          "$ref": "#/$defs/ResourceId"
        },
        "url": {
          "type": "string"
        },
        "event_types": {
          "type": "array",
          "items": {
            "enum": [
              "VALVE_RUN_START_EVENT",
              "VALVE_RUN_END_EVENT",
              "PROGRAM_RAIN_SKIP_CREATED_EVENT",
              "PROGRAM_RAIN_SKIP_CANCELED_EVENT",
              "SCHEDULE_STARTED_EVENT",
              "SCHEDULE_STOPPED_EVENT",
              "SCHEDULE_COMPLETED_EVENT",
              "DEVICE_ZONE_RUN_STARTED_EVENT",
              "DEVICE_ZONE_RUN_PAUSED_EVENT",
              "DEVICE_ZONE_RUN_STOPPED_EVENT",
              "DEVICE_ZONE_RUN_COMPLETED_EVENT",
              "CLIMATE_SKIP_NOTIFICATION_EVENT",
              "FREEZE_SKIP_NOTIFICATION_EVENT",
              "RAIN_SKIP_NOTIFICATION_EVENT",
              "WIND_SKIP_NOTIFICATION_EVENT",
              "NO_SKIP_NOTIFICATION_EVENT"
            ],
            "type": "string",
            "format": "enum"
          }
        }
      }
    }
  }
}