{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/juzpost/json-schema/juzpost-create-post-request-schema.json",
  "title": "CreatePostRequest",
  "description": "Fields for a new draft. Every field is optional; an empty body creates an empty draft of\ntype `video`. Scheduling is a separate call.\n",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/juzpost-openapi.json#/components/schemas/CreatePostRequest",
  "type": "object",
  "properties": {
    "content": {
      "type": "string",
      "maxLength": 2200,
      "description": "The post body or caption, up to 2200 characters. Defaults to an empty string.\nPer-platform limits are enforced later, at schedule time.\n"
    },
    "mediaUrls": {
      "type": "array",
      "description": "Storage keys of already-uploaded media, using the `resolvedKey` values returned by\n`POST /storage/presign`. Listing a key here claims it so it will not be swept away\nas an orphan. These are storage keys, not public URLs.\n",
      "items": {
        "type": "string",
        "description": "A storage key returned by the presign operation."
      }
    },
    "title": {
      "type": "string",
      "maxLength": 200,
      "description": "Title stored in the post's metadata. Note that scheduling re-validates titles against\na 100-character limit, so keep it under that if the post will be scheduled.\n"
    },
    "description": {
      "type": "string",
      "description": "Long-form description stored in the post's metadata, used by platforms that have a\ndescription field separate from the caption.\n"
    },
    "hashtags": {
      "type": "array",
      "description": "Hashtags stored in the post's metadata. Do not include the leading `#`.",
      "items": {
        "type": "string",
        "description": "A single hashtag, without the `#`."
      }
    },
    "type": {
      "$ref": "#/$defs/PostType"
    },
    "coverR2Key": {
      "type": "string",
      "description": "Storage key of a cover image already uploaded via `POST /storage/presign`.\nReferencing it here also claims it against the orphan sweeper.\n"
    }
  },
  "$defs": {
    "PostType": {
      "type": "string",
      "description": "What kind of content the post carries. Anything other than `text` and `blog` must have at\nleast one media key before it can be scheduled. `blog` is a WordPress blog post: `title`\nis required and `description` is the body, HTML sent as written (plain text works, blank\nlines become paragraphs). The first image is the featured image and any others are added\nunder the body. Images only.\n",
      "enum": [
        "text",
        "image",
        "video",
        "story",
        "blog"
      ]
    }
  }
}