{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/bigtincan/main/json-schema/bigtincan-update-story-request-schema.json",
  "title": "Update_Story_Request",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bigtincan-story-api-openapi.yml#/components/schemas/Update_Story_Request",
  "required": [
    "name",
    "channels"
  ],
  "properties": {
    "title": {
      "description": "Story title",
      "type": "string"
    },
    "channels": {
      "description": "Channels",
      "type": "array",
      "items": {
        "properties": {
          "id": {
            "description": "Channel ID",
            "type": "string"
          },
          "is_alias": {
            "description": "Channel Alias",
            "type": "boolean",
            "default": false
          }
        },
        "type": "object"
      }
    },
    "description": {
      "type": "string"
    },
    "excerpt": {
      "type": "string"
    },
    "new_files": {
      "description": "New files",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Story_File_Edit_Request_Object",
        "type": "object"
      }
    },
    "files": {
      "description": "Existing files",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Story_File_Edit_Request_Object",
        "type": "object"
      }
    },
    "append_files": {
      "description": "Append files to the story",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Story_File_Edit_Request_Object",
        "type": "object"
      }
    },
    "remove_files": {
      "description": "Remove files from the story",
      "type": "array",
      "items": {
        "properties": {
          "filename": {
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "events": {
      "description": "Event objects",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Story_Event_Request_Object",
        "type": "object"
      }
    },
    "tags": {
      "description": "Tag objects",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Story_Tag_Request_Object",
        "type": "object"
      }
    },
    "sharing_bitmask": {
      "type": "integer"
    },
    "is_password_protected": {
      "type": "boolean",
      "default": false
    },
    "can_annotate": {
      "type": "boolean",
      "default": true
    },
    "is_notifications_enabled": {
      "type": "boolean",
      "default": true
    },
    "is_publicly_accessible": {
      "type": "boolean",
      "default": false
    },
    "quicklink_url": {
      "type": "string"
    },
    "quicklink_fallback": {
      "type": "string"
    },
    "quickfile": {
      "type": "boolean",
      "default": false
    },
    "cover_art_url": {
      "type": "string"
    },
    "expires_at": {
      "type": "integer",
      "default": 0
    },
    "expires_at_tz": {
      "type": "string",
      "default": ""
    }
  },
  "type": "object",
  "$defs": {
    "Story_Event_Request_Object": {
      "required": [
        "title",
        "tz",
        "start",
        "end",
        "all_day"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "tz": {
          "type": "string"
        },
        "start": {
          "description": "Unix timestamp",
          "type": "integer"
        },
        "end": {
          "description": "Unix timestamp",
          "type": "integer"
        },
        "all_day": {
          "description": "All day event",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "Story_File_Edit_Request_Object": {
      "required": [
        "filename",
        "description",
        "share_status"
      ],
      "properties": {
        "filename": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "share_status": {
          "type": "string",
          "enum": [
            "mandatory",
            "optional",
            "blocked"
          ]
        },
        "file_group": {
          "type": "string"
        },
        "allow_pitch_builder": {
          "description": "Allow file to be added to pitch builder.",
          "type": "boolean",
          "default": true
        },
        "prevent_editing": {
          "description": "Prevent editing within pitch builder. allow_pitch_builder needs to be set to true to set this value to true.",
          "type": "boolean",
          "default": false
        },
        "tags": {
          "description": "Tag objects",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Story_Tag_Request_Object",
            "type": "object"
          }
        }
      },
      "type": "object"
    },
    "Story_Tag_Request_Object": {
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}