{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postproxy-dev/json-schema/postproxy-dev-post-update-request-schema.json",
  "title": "PostUpdateRequest",
  "description": "Request body for updating a post. All parameters are optional — only send the fields you want to change. profiles, media, and thread are full replaces; post fields and platforms are merged.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postproxy-dev-posts-api-openapi.yml#/components/schemas/PostUpdateRequest",
  "type": "object",
  "properties": {
    "post": {
      "type": "object",
      "description": "Merged with existing values — only the fields you include are changed",
      "properties": {
        "body": {
          "type": "string",
          "description": "Updated text content"
        },
        "scheduled_at": {
          "type": "string",
          "format": "date-time",
          "description": "Updated ISO 8601 schedule timestamp"
        },
        "draft": {
          "type": "boolean",
          "description": "Set or unset draft status"
        }
      }
    },
    "profiles": {
      "type": "array",
      "description": "Full replace: all existing profile assignments are removed and replaced with the new set (array of profile IDs or platform names)",
      "items": {
        "type": "string"
      }
    },
    "platforms": {
      "type": "object",
      "description": "Merged with existing platform params. When sent together with profiles, platform params are applied to the new profile set (same as create)",
      "additionalProperties": true
    },
    "media": {
      "type": "array",
      "description": "Full replace: all existing media attachments are destroyed and replaced. Send an empty array to remove all media",
      "items": {
        "type": "string"
      }
    },
    "thread": {
      "type": "array",
      "description": "Full replace: all existing thread children are destroyed and rebuilt from the new array. Send an empty array to remove all thread children. Thread children automatically inherit the parent's profiles, scheduling, and draft status",
      "items": {
        "$ref": "#/$defs/PostThreadItemRequest"
      }
    },
    "queue_id": {
      "type": "string",
      "description": "Assign the post to a queue"
    },
    "queue_priority": {
      "type": "string",
      "description": "Queue priority",
      "enum": [
        "high",
        "medium",
        "low"
      ]
    },
    "profile_group_id": {
      "type": "string",
      "description": "Scope the lookup to a specific profile group"
    }
  },
  "$defs": {
    "PostThreadItemRequest": {
      "type": "object",
      "description": "A thread child post. Position is determined by array order (first item = first reply).",
      "required": [
        "body"
      ],
      "properties": {
        "body": {
          "type": "string",
          "description": "Text content for this thread post"
        },
        "media": {
          "type": "array",
          "description": "Array of media URLs (same format as top-level media)",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}