{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/awraiter-ai/json-schema/awraiter-ai-create-post-from-text-input-schema.json",
  "title": "CreatePostFromTextInput",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/awraiter-ai-openapi.json#/components/schemas/CreatePostFromTextInput",
  "type": "object",
  "properties": {
    "channelId": {
      "type": "number"
    },
    "body": {
      "type": "string",
      "description": "Post text in Markdown as Telegram renders it: **bold**, *italic*, __underline__, ~~strikethrough~~, ||spoiler||, [text](https://link), `code`. A quote is one or more lines starting with \"> \"; it ends at the first line without \">\", and goes out as a plain quote. Separate paragraphs with a blank line. Premium emoji: <tg-emoji id=\"ID\">🔥</tg-emoji>, with an ID from the channel's emoji sets (get_channel → customEmoji); the emoji inside the tag must be the base emoji of that ID and is shown where premium emoji cannot render."
    },
    "title": {
      "type": "string"
    },
    "deslop": {
      "type": "boolean",
      "description": "Strip AI-tell typography (em dashes -> hyphen, smart quotes). Default true. No AI is used either way."
    },
    "imageUrls": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 10,
      "description": "Public http(s) direct links to images to attach (jpg/png/webp; svg/gif rejected)."
    },
    "videoUrls": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 3,
      "description": "Public http(s) direct links to videos to attach (mp4 preferred)."
    },
    "audioUrls": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 5,
      "description": "Public http(s) direct links to audio files (mp3/m4a/ogg/wav/flac, up to 49 MB each), sent as music tracks with the post text as the caption. Not a YouTube/SoundCloud page: the link must return the file itself. Cannot be combined with imageUrls/videoUrls. Requires rightsConfirmed:true."
    },
    "rightsConfirmed": {
      "type": "boolean",
      "description": "Required with audioUrls. Set true only after the operator has confirmed they hold the rights to use these tracks and publish them in the channel. Ask them; never assume."
    },
    "planItemId": {
      "type": "number",
      "description": "Optional content-plan slot id this draft fills. The slot must belong to this channel's plan and have no post yet; on success the draft is linked to it and the slot is marked completed. The channel's autopilot policy then decides: the response's `autopilot.action` is 'auto' (a plan was created at the slot time, `planId`/`publishAt`) or 'approve' (the draft waits in the review queue; `reason` says why — policy_manual, streak_below_target, recommendation_revise, banlist_hit, quiet hours, daily limit…). Do not call schedule_post for a draft the policy already scheduled."
    },
    "publishOptions": {
      "type": "object",
      "description": "Optional Telegram publish options, applied when the post goes out. Set only what the operator asked for.",
      "properties": {
        "silent": {
          "type": "boolean",
          "description": "Deliver without a notification sound."
        },
        "pin": {
          "type": "boolean",
          "description": "Pin the post in the channel once it is published (an album pins its first item)."
        },
        "protect": {
          "type": "boolean",
          "description": "Protected content: subscribers cannot forward or save the post."
        },
        "spoiler": {
          "type": "boolean",
          "description": "Blur the photos and videos until tapped. No effect on text or audio."
        },
        "buttons": {
          "type": "array",
          "description": "URL buttons under the post: an array of rows, each row an array of {text, url}. Up to 5 rows of 3; links must be https://, http:// or tg://. Not possible on an album (more than one photo/video). Added by the channel's bot right after the post goes out, so the channel must be connected through the bot.",
          "maxItems": 5,
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 3,
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "url": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1024
                }
              },
              "required": [
                "text",
                "url"
              ],
              "additionalProperties": false
            }
          }
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "channelId",
    "body"
  ],
  "additionalProperties": false
}