{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cadencz-com/json-schema/cadencz-com-post-create-schema.json",
  "title": "PostCreate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cadencz-com-posts-api-openapi.yml#/components/schemas/PostCreate",
  "properties": {
    "idea": {
      "type": "string",
      "minLength": 1,
      "title": "Idea"
    },
    "source": {
      "type": "string",
      "enum": [
        "manual",
        "agent"
      ],
      "title": "Source",
      "default": "manual"
    },
    "brain_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Brain Id"
    },
    "timezone": {
      "type": "string",
      "title": "Timezone",
      "description": "IANA zone the schedule times were chosen in. `scheduled_at` is already absolute, so this does not move the post — it records what the customer meant, which is what a later reschedule or a best-time read has to honour.",
      "default": "UTC"
    },
    "variants": {
      "items": {
        "$ref": "#/$defs/VariantCreate"
      },
      "type": "array",
      "title": "Variants"
    }
  },
  "type": "object",
  "required": [
    "idea"
  ],
  "$defs": {
    "VariantCreate": {
      "properties": {
        "channel_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Channel Id"
        },
        "platform": {
          "type": "string",
          "title": "Platform"
        },
        "body": {
          "type": "string",
          "minLength": 1,
          "title": "Body"
        },
        "media_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Media Ids"
        },
        "platform_target": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Platform Target",
          "description": "Optional platform-specific destination, e.g. Reddit subreddit."
        },
        "scheduled_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Scheduled At"
        },
        "content_metadata": {
          "additionalProperties": true,
          "type": "object",
          "title": "Content Metadata"
        },
        "thread_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Thread Id"
        },
        "thread_position": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Thread Position"
        }
      },
      "type": "object",
      "required": [
        "platform",
        "body"
      ],
      "title": "VariantCreate"
    }
  }
}