{
  "id": "share.json",
  "$schema": "http://json-schema.org/draft-04/schema",
  "title": "Share",
  "description": "Content sharing payload",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "URL of the shared resource",
      "example": "http://www.fastcolabs.com/3016289/how-an-arcane-coding-method-from-1970s-banking-software-could-save-the-sanity-of-web-develop"
    },
    "content": {
      "type": "string",
      "description": "HTML or Markdown payload"
    },
    "type": {
      "type": "string",
      "description": "MIME type for the content",
      "example": "text/markdown"
    },
    "site": {
      "$ref": "base.json#/definitions/site"
    },
    "compress": {
      "type": "boolean",
      "description": "Whether to compress the shared content to a single article block"
    },
    "sitemedia": {
      "type": "boolean",
      "description": "Whether to share to site media instead of an item"
    },
    "item": {
      "$ref": "base.json#/definitions/uuid",
      "description": "Identifier of the content item to share *into*.\nWhen specifying this shared content goes into the specified item, instead of a new one.\n"
    },
    "block": {
      "$ref": "base.json#/definitions/uuid",
      "description": "Identifier to use for the generated content block.\nSpecifying this means an identifier will not be autogenerated.\nUseful if wanting to use a placeholder block, for instance to track its position in an item while API is working.\n"
    },
    "publish": {
      "type": "boolean",
      "description": "Whether to publish the shared content automatically once sharing completes"
    },
    "via": {
      "type": "object",
      "description": "Where the content was discovered if different site than publisher",
      "properties": {
        "url": {
          "type": "string",
          "description": "URL where the resource was discovered",
          "example": "https://bergie.today/"
        },
        "name": {
          "type": "string",
          "description": "Name of the site where the resource was discovered",
          "example": "Bergie Today"
        }
      },
      "required": [
        "url"
      ]
    }
  },
  "required": [
    "url"
  ],
  "dependencies": {
    "publish": [
      "site"
    ],
    "block": [
      "item"
    ]
  }
}