{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/rachio/main/json-schema/rachio-create-webhook-request-schema.json",
  "title": "CreateWebhookRequest",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rachio-webhooks-openapi.yml#/components/schemas/CreateWebhookRequest",
  "type": "object",
  "properties": {
    "external_id": {
      "type": "string",
      "description": "Optional"
    },
    "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"
      }
    }
  },
  "$defs": {
    "ResourceId": {
      "type": "object",
      "properties": {
        "valve_id": {
          "type": "string"
        },
        "irrigation_controller_id": {
          "type": "string"
        },
        "program_id": {
          "type": "string"
        },
        "lighting_controller_id": {
          "type": "string"
        }
      }
    }
  }
}