{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/schedchie-com/json-schema/schedchie-com-create-post-schema.json",
  "title": "CreatePost",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/schedchie-com-openapi.json#/components/schemas/CreatePost",
  "type": "object",
  "required": [
    "text",
    "accountIds",
    "scheduledTime"
  ],
  "additionalProperties": false,
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "description": "The post's text, for every account unless overridden in `platformSpecificContent`."
    },
    "accountIds": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      },
      "description": "`accountId` values from `GET /accounts`."
    },
    "scheduledTime": {
      "type": "string",
      "format": "date-time",
      "description": "When to publish, ISO 8601 in UTC (`2026-12-01T09:00:00.000Z`). A time in the past publishes within a minute."
    },
    "hashtags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Hashtags for every account, with or without `#`."
    },
    "platformSpecificContent": {
      "type": "object",
      "description": "Per-account overrides keyed by `accountId`. Fields are prefixed with\nthe platform: `youtube_title`, `youtube_privacyStatus`,\n`tiktok_privacyStatus`, `instagram_first_comment`,\n`linkedin_first_comment`, `pinterest_boardId`, and so on.\n",
      "additionalProperties": {
        "type": "object"
      }
    },
    "media": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/MediaInput"
      },
      "description": "Media for every selected account."
    }
  },
  "$defs": {
    "MediaInput": {
      "description": "A `media` object from `POST /media`, `POST /media/uploads/{slotId}/confirm` or `GET /media/uploads/{slotId}`, or just its `gcsObjectName`.",
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "description": "The `gcsObjectName` alone."
        },
        {
          "$ref": "#/$defs/MediaInputObject"
        }
      ]
    },
    "MediaInputObject": {
      "type": "object",
      "description": "A media object as returned by the media routes (`gcsObjectName` is the one field that matters).",
      "required": [
        "gcsObjectName"
      ],
      "properties": {
        "gcsObjectName": {
          "type": "string"
        },
        "blobName": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "originalName": {
          "type": "string"
        },
        "mimeType": {
          "type": "string"
        },
        "size": {
          "type": "integer"
        },
        "type": {
          "type": "string",
          "enum": [
            "image",
            "video"
          ]
        },
        "finalUrlAfterProcessing": {
          "type": "string"
        },
        "cover": {
          "type": "object",
          "description": "A cover frame or image for a video.",
          "properties": {
            "gcsObjectName": {
              "type": "string"
            },
            "blobName": {
              "type": "string"
            },
            "offsetMs": {
              "type": "integer"
            }
          }
        }
      }
    }
  }
}