{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shapelessai/json-schema/shapelessai-post-create-schema.json",
  "title": "PostCreate",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shapelessai-openapi.json#/components/schemas/PostCreate",
  "type": "object",
  "properties": {
    "connectionId": {
      "type": "string",
      "description": "The target account (GET /api/connections)."
    },
    "postText": {
      "type": "string",
      "maxLength": 10000
    },
    "mediaKeys": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 35,
      "description": "Keys from an upload route; the account's own media only."
    },
    "documentTitle": {
      "type": "string",
      "maxLength": 120,
      "description": "Required on YouTube (the video title)."
    },
    "scheduledAt": {
      "type": "string",
      "format": "date-time",
      "description": "When it goes out. Omitted or past = publish now."
    },
    "queue": {
      "type": "boolean",
      "enum": [
        true
      ],
      "description": "Instead of scheduledAt: the next free slot of the account's queue."
    },
    "settings": {
      "type": "object",
      "description": "Per-platform knobs; the schema is GET /api/platforms[].settingsSchema."
    },
    "firstComment": {
      "type": "string",
      "maxLength": 1250,
      "description": "Posted as the post's own first reply the moment it is live. LinkedIn (1250), X (280), Bluesky (300)."
    },
    "audio": {
      "$ref": "#/$defs/ReelAudio"
    },
    "inspiration": {
      "$ref": "#/$defs/PostInspiration"
    }
  },
  "required": [
    "connectionId",
    "postText"
  ],
  "additionalProperties": false,
  "$defs": {
    "PostInspiration": {
      "type": "object",
      "description": "What the post was made from: the predicted half of predicted-vs-actual. A malformed one is dropped, never a 400. A post made from a reference carries kind reference-post, the member id from GET /api/v1/references and the mode.",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "format-card",
            "topical-story",
            "reference-post",
            "brand"
          ]
        },
        "id": {
          "type": "string",
          "maxLength": 200,
          "description": "The source's own id, e.g. platform:post_id for a reference post."
        },
        "lane": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "mode": {
          "type": "string",
          "enum": [
            "clone",
            "format",
            "inspiration"
          ]
        },
        "memberId": {
          "type": "string",
          "description": "The reference member it was made from."
        }
      },
      "required": [
        "kind",
        "id"
      ]
    },
    "ReelAudio": {
      "type": "object",
      "description": "Instagram Reels only (one video): a platform sound attached at publish by id. Needs the account connected through Facebook Login.",
      "properties": {
        "audioId": {
          "type": "string",
          "pattern": "^[0-9]+$",
          "description": "From GET /api/v1/instagram/audio, or a reference reel's audio asset id."
        },
        "audioVolume": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "description": "The sound's level; Meta's default 100."
        },
        "videoVolume": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "description": "The video's own soundtrack under it; Meta's default 100."
        }
      },
      "required": [
        "audioId"
      ]
    }
  }
}