{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/deploy-social/json-schema/deploy-social-update-post-schema.json",
  "title": "UpdatePost",
  "description": "Only what you send changes. `null` clears a field. `destinations` replaces the list. A post's `kind` can't change here. Start a new one instead.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/deploy-social-openapi.yml#/components/schemas/UpdatePost",
  "type": "object",
  "properties": {
    "media_id": {
      "description": "Video posts only.",
      "type": "string"
    },
    "media": {
      "description": "Replaces the whole photo list. Photos posts only.",
      "minItems": 1,
      "maxItems": 35,
      "type": "array",
      "items": {
        "$ref": "#/$defs/PostMediaInput"
      }
    },
    "caption": {
      "description": "The caption every destination uses unless it has its own. `null` leaves it empty.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 65536
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "description": "YouTube's title. `null` clears it. Video only.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "description": "YouTube's description. `null` clears it. Video only.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 5000
        },
        {
          "type": "null"
        }
      ]
    },
    "tags": {
      "description": "Video only.",
      "anyOf": [
        {
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 500
          },
          "description": "Tags, without the #. YouTube only."
        },
        {
          "type": "null"
        }
      ]
    },
    "first_comment": {
      "description": "Posted as the first comment where the platform takes one. `null` clears it. Video only.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2200
        },
        {
          "type": "null"
        }
      ]
    },
    "notify_email": {
      "description": "Email the workspace when the post has gone out.",
      "type": "boolean"
    },
    "vertical_fit": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "blur",
            "bars"
          ],
          "description": "How to make a landscape or square video vertical for the destinations that would refuse or letterbox it (Facebook Reels, YouTube Shorts, TikTok, Instagram Reels): `blur` (the video centered over a blurred copy of itself) or `bars` (black above and below). X, Threads and Bluesky always get the original. Leave it out and a landscape video (Facebook Reels also refuses a square one) is refused, with a `video_needs_vertical_fit` detail that lists the fixes. Video only."
        },
        {
          "type": "null"
        }
      ]
    },
    "destinations": {
      "description": "Replaces the whole list.",
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "$ref": "#/$defs/DestinationInput"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "DestinationInput": {
      "type": "object",
      "properties": {
        "destination_id": {
          "type": "string",
          "description": "The destination's id. Starts with `dest_`."
        },
        "caption": {
          "description": "A caption for this destination only.",
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2200
            },
            {
              "type": "null"
            }
          ]
        },
        "title": {
          "description": "YouTube only.",
          "anyOf": [
            {
              "type": "string",
              "maxLength": 100
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "description": "YouTube only.",
          "anyOf": [
            {
              "type": "string",
              "maxLength": 5000
            },
            {
              "type": "null"
            }
          ]
        },
        "tags": {
          "anyOf": [
            {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 500
              },
              "description": "Tags, without the #. YouTube only."
            },
            {
              "type": "null"
            }
          ]
        },
        "first_comment": {
          "description": "A first comment for this destination, where the platform takes one.",
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2200
            },
            {
              "type": "null"
            }
          ]
        },
        "options": {
          "description": "Settings for this platform, by name. See the destination's options. Anything you leave out uses its default. For a `text` post on X, Bluesky or Threads, `thread: true` splits a too-long caption into a thread instead of refusing it. For a `photos` post on X or Bluesky, `photo_positions` (a list of positions from `media`, as strings, like `[\"0\",\"2\"]`) picks which photos go out there when you sent more than the platform takes.",
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "boolean"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          }
        }
      },
      "required": [
        "destination_id"
      ],
      "additionalProperties": false
    },
    "PostMediaInput": {
      "type": "object",
      "properties": {
        "media_id": {
          "type": "string",
          "description": "The video's id. Starts with `media_`."
        },
        "alt_text": {
          "description": "Alt text for this photo, where the platform takes it.",
          "type": "string",
          "maxLength": 1000
        }
      },
      "required": [
        "media_id"
      ],
      "additionalProperties": false
    }
  }
}