{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.wherever.audio/schemas/webhooks/references/episode/v1.json",
  "type": "object",
  "properties": {
    "guid": {
      "description": "The item's RSS guid. May be absent or unstable on private feeds.",
      "type": "string"
    },
    "podcastGuid": {
      "type": "string"
    },
    "feedUrl": {
      "type": "string",
      "description": "URL of the feed the episode was published in (Podcast Index `feedUrl`)."
    },
    "feedTitle": {
      "description": "Title of the `feedUrl` feed (Podcast Index `feedTitle`).",
      "type": "string"
    },
    "enclosureUrl": {
      "type": "string",
      "description": "Media URL as the feed publishes it; never a redirect target or local URL."
    },
    "title": {
      "type": "string"
    },
    "duration": {
      "type": "number",
      "minimum": 0,
      "description": "Best-effort length from the feed; use the segment's `mediaDuration` when present (seconds)"
    },
    "private": {
      "description": "Present only when the episode's feed is marked private; see Show reference.",
      "type": "boolean",
      "const": true
    }
  },
  "required": [
    "feedUrl",
    "enclosureUrl"
  ],
  "title": "Episode reference",
  "description": "An episode is identified by `feedUrl` plus `guid`, falling back to `enclosureUrl` when there is no guid."
}
