{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/socialbu-com/json-schema/socialbu-com-youtube-post-request-schema.json",
  "title": "YoutubePostRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/socialbu-com-openapi-openapi.yml#/components/schemas/YoutubePostRequest",
  "allOf": [
    {
      "$ref": "#/$defs/GenericPostRequest"
    },
    {
      "type": "object",
      "properties": {
        "options": {
          "type": "object",
          "description": "Additional options for the post.",
          "properties": {
            "video_title": {
              "type": "string",
              "description": "Title of video."
            },
            "video_tags": {
              "type": "string",
              "description": "Add tags, separated by comma."
            },
            "category_id": {
              "type": "integer",
              "description": "You can get the categories list from account's extra_data."
            },
            "privacy_status": {
              "type": "string",
              "description": "Set the video privacy (public, private, or unlisted)."
            },
            "post_as_short": {
              "type": "boolean",
              "description": "Set true to post the video as youtube shorts."
            },
            "made_for_kids": {
              "type": "boolean",
              "description": "Set true to post the video as made for kids."
            },
            "thumbnail": {
              "type": "object",
              "description": "Supported for posts having video attachment.",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "File name (e.g., \"image.png\")."
                },
                "mimeType": {
                  "type": "string",
                  "description": "MIME type of the media (e.g., \"image/png\")."
                },
                "extension": {
                  "type": "string",
                  "description": "File type (e.g., \"png\")"
                },
                "key": {
                  "type": "string",
                  "description": "Media key, received when uploading media using media upload endpoint."
                },
                "url": {
                  "type": "string",
                  "description": "Media URL, received when uploading media using media upload endpoint."
                },
                "secureKey": {
                  "type": "string",
                  "description": "Media secure, key received when uploading media using media upload endpoint."
                },
                "temporary": {
                  "type": "boolean",
                  "description": "Media status, received when uploading media using media upload endpoint."
                },
                "_metaData": {
                  "type": "object",
                  "description": "Information about media.",
                  "properties": {
                    "width": {
                      "type": "integer",
                      "description": "Width of the media."
                    },
                    "height": {
                      "type": "integer",
                      "description": "Height of the media."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "GenericPostRequest": {
      "type": "object",
      "required": [
        "accounts",
        "publish_at"
      ],
      "properties": {
        "accounts": {
          "type": "array",
          "description": "ID(s) of one or more social media accounts.",
          "items": {
            "type": "integer"
          }
        },
        "team_id": {
          "type": "integer",
          "description": "Team Id of social media account."
        },
        "publish_at": {
          "type": "string",
          "description": "Format should be Y-m-d H:i:s (UTC)"
        },
        "content": {
          "type": "string",
          "description": "The content for the post."
        },
        "draft": {
          "type": "boolean",
          "description": "Save the post as a draft"
        },
        "queue_ids": {
          "type": "array",
          "description": "If provided, the post will be added to the specified queues.",
          "items": {
            "type": "integer"
          }
        },
        "existing_attachments": {
          "type": "array",
          "description": "Attachments already uploaded to SocialBu's storage using media upload endpoint.",
          "items": {
            "type": "object",
            "properties": {
              "upload_token": {
                "type": "string",
                "description": "The value received from /upload_media/status endpoint."
              }
            }
          }
        },
        "postback_url": {
          "type": "string",
          "description": "Receive postback at this URL if needed. Sends a JSON POST request with parameters `post_id`, `account_id`, and `status` (created, published, failed)."
        }
      }
    }
  }
}