{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/jamframe-com/json-schema/jamframe-com-social-post-input-schema.json",
  "title": "SocialPostInput",
  "description": "One media source (`templateId`, `renderId` or `mediaUrls`; drafts\nmay have none), the accounts, the caption, and when. Unknown fields\nare refused.\n",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/jamframe-com-openapi.yml#/components/schemas/SocialPostInput",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "templateId": {
      "type": "string",
      "maxLength": 64,
      "description": "Render this template and post the result."
    },
    "modifications": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/ModificationValue"
      },
      "description": "The template's parameters, as for `POST /render`."
    },
    "response": {
      "type": "object",
      "additionalProperties": false,
      "description": "Render options. Default format: `jpeg` when an Instagram or\nTikTok account is in the post, `mp4` when every account is\nYouTube, else `png`.\n",
      "properties": {
        "format": {
          "type": "string",
          "enum": [
            "png",
            "jpeg",
            "jpg",
            "webp",
            "pdf",
            "mp4"
          ]
        },
        "scale": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3
        },
        "quality": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "includePages": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 1
          },
          "maxItems": 50
        }
      }
    },
    "renderId": {
      "type": "string",
      "maxLength": 64,
      "description": "Post the stored files of this render."
    },
    "mediaUrls": {
      "type": "array",
      "minItems": 1,
      "maxItems": 35,
      "items": {
        "type": "string",
        "maxLength": 2048
      },
      "description": "Image, video or PDF URLs (up to 100 MB each), downloaded and stored when the post is created."
    },
    "accounts": {
      "type": "array",
      "maxItems": 25,
      "description": "Account ids, or objects overriding the caption or options for one account.",
      "items": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "caption": {
                "type": "string"
              },
              "options": {
                "type": "object",
                "description": "This account's platform options (see `options`)."
              }
            }
          }
        ]
      }
    },
    "caption": {
      "type": "string",
      "maxLength": 70000
    },
    "captions": {
      "type": "object",
      "description": "Per-platform captions over `caption` (a LinkedIn page falls back to `linkedin`).",
      "additionalProperties": false,
      "properties": {
        "instagram": {
          "type": "string"
        },
        "facebook": {
          "type": "string"
        },
        "linkedin": {
          "type": "string"
        },
        "linkedin_page": {
          "type": "string"
        },
        "x": {
          "type": "string"
        },
        "tiktok": {
          "type": "string"
        },
        "youtube": {
          "type": "string"
        },
        "pinterest": {
          "type": "string"
        },
        "bluesky": {
          "type": "string"
        },
        "buffer": {
          "type": "string"
        }
      }
    },
    "options": {
      "type": "object",
      "additionalProperties": false,
      "description": "Per-platform options.",
      "properties": {
        "instagram": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "shareToFeed": {
              "type": "boolean",
              "description": "Reels: also show in the feed (default true)."
            }
          }
        },
        "facebook": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 255,
              "description": "Video title."
            }
          }
        },
        "linkedin": {
          "$ref": "#/$defs/LinkedInPostOptions"
        },
        "linkedin_page": {
          "$ref": "#/$defs/LinkedInPostOptions"
        },
        "x": {
          "type": "object",
          "additionalProperties": false
        },
        "tiktok": {
          "type": "object",
          "additionalProperties": false,
          "description": "TikTok requires an explicit `privacyLevel` (one the creator\noffers). Until TikTok audits the app only `SELF_ONLY` works.\nWith `draft: true` the post goes to the creator's TikTok inbox\ninstead, and they finish it in the TikTok app: no\n`privacyLevel` needed, and the interaction and disclosure\noptions don't apply.\n",
          "properties": {
            "draft": {
              "type": "boolean",
              "description": "Send to the creator's TikTok inbox as a draft instead of posting. Video drafts carry no caption; photo drafts keep `title` and the caption. At most 5 pending drafts per account in 24 hours."
            },
            "privacyLevel": {
              "type": "string",
              "enum": [
                "PUBLIC_TO_EVERYONE",
                "MUTUAL_FOLLOW_FRIENDS",
                "FOLLOWER_OF_CREATOR",
                "SELF_ONLY"
              ]
            },
            "allowComment": {
              "type": "boolean"
            },
            "allowDuet": {
              "type": "boolean"
            },
            "allowStitch": {
              "type": "boolean"
            },
            "commercialContent": {
              "type": "boolean",
              "description": "The content disclosure toggle."
            },
            "yourBrand": {
              "type": "boolean",
              "description": "Promotes yourself or your business (Promotional content)."
            },
            "brandedContent": {
              "type": "boolean",
              "description": "Promotes a third party (Paid partnership); can't be SELF_ONLY."
            },
            "aiGenerated": {
              "type": "boolean"
            },
            "title": {
              "type": "string",
              "description": "Photo posts: the title (90 characters)."
            },
            "autoAddMusic": {
              "type": "boolean"
            },
            "videoCoverTimestampMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        "youtube": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "title": {
              "type": "string",
              "description": "Default: the caption's first line (100 characters)."
            },
            "privacy": {
              "type": "string",
              "enum": [
                "public",
                "unlisted",
                "private"
              ]
            },
            "madeForKids": {
              "type": "boolean"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "categoryId": {
              "type": "string",
              "description": "YouTube category id (default 22)."
            },
            "aiGenerated": {
              "type": "boolean",
              "description": "Altered or synthetic content."
            }
          }
        },
        "pinterest": {
          "type": "object",
          "additionalProperties": false,
          "description": "The caption is the Pin's description (800 characters). Set\n`boardId` per account (`accounts[].options`) to pick a board.\n",
          "properties": {
            "boardId": {
              "type": "string",
              "description": "The board (default: the account's first board)."
            },
            "title": {
              "type": "string",
              "maxLength": 100,
              "description": "The Pin's title."
            },
            "link": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048,
              "description": "Where the Pin links to."
            },
            "altText": {
              "type": "string",
              "maxLength": 500
            }
          }
        },
        "bluesky": {
          "type": "object",
          "additionalProperties": false,
          "description": "Captions are limited to 300 graphemes; up to 4 images (2 MB each) or 1 video.",
          "properties": {
            "altText": {
              "type": "string",
              "maxLength": 2000,
              "description": "Alt text for the images or the video."
            }
          }
        },
        "buffer": {
          "type": "object",
          "additionalProperties": false,
          "description": "Buffer channels (docs/buffer.md).",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "queue",
                "next",
                "now",
                "draft"
              ],
              "description": "queue (default): the next free slot; next: first in the queue; now: at once; draft: a Buffer draft."
            },
            "instagramType": {
              "type": "string",
              "enum": [
                "post",
                "story",
                "reel"
              ]
            },
            "facebookType": {
              "type": "string",
              "enum": [
                "post",
                "story",
                "reel"
              ]
            },
            "pinterestBoardId": {
              "type": "string",
              "maxLength": 100,
              "description": "Default: the channel's first board."
            },
            "title": {
              "type": "string",
              "maxLength": 100,
              "description": "Pinterest Pin title."
            },
            "link": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048,
              "description": "Pinterest Pin link."
            },
            "youtubeCategoryId": {
              "type": "string",
              "description": "YouTube category id (default 22)."
            }
          }
        }
      }
    },
    "scheduledAt": {
      "type": "string",
      "description": "ISO 8601. With `Z` or an offset it is absolute; without one it is\nread in `timezone`. Up to a year ahead; omit to post now.\n"
    },
    "timezone": {
      "type": "string",
      "description": "IANA time zone, e.g. Europe/Paris (default UTC)."
    },
    "draft": {
      "type": "boolean",
      "description": "Save without posting."
    }
  },
  "$defs": {
    "LinkedInPostOptions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "firstComment": {
          "type": "string",
          "maxLength": 1250,
          "description": "Posted as a comment right after the post."
        },
        "documentTitle": {
          "type": "string",
          "maxLength": 400,
          "description": "PDF document posts: the title."
        },
        "visibility": {
          "type": "string",
          "enum": [
            "PUBLIC",
            "CONNECTIONS"
          ],
          "description": "Profiles only (default PUBLIC)."
        }
      }
    },
    "ModificationValue": {
      "description": "A value for one modification key. Strings are used as-is (up to\n20,000 characters; `subtitles` up to 500,000, a whole SRT or WebVTT\nfile); numbers and booleans are accepted for numeric and boolean\nstyle properties; `null` clears the value. `subtitles` also takes\nan array of cues.\n",
      "oneOf": [
        {
          "type": "string",
          "maxLength": 500000
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "maxItems": 5000,
          "description": "`subtitles` only: the cues, in seconds on the video's timeline.",
          "items": {
            "$ref": "#/$defs/SubtitleCue"
          }
        }
      ]
    },
    "SubtitleCue": {
      "type": "object",
      "required": [
        "start",
        "end",
        "text"
      ],
      "properties": {
        "start": {
          "type": "number",
          "minimum": 0,
          "description": "Seconds on the video's timeline when the cue appears."
        },
        "end": {
          "type": "number",
          "description": "Seconds when it goes (after `start`)."
        },
        "text": {
          "type": "string",
          "maxLength": 1000,
          "description": "Plain text; a newline starts a new line. Styling tags are stripped."
        }
      }
    }
  }
}