{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cubi-estate/json-schema/cubi-estate-admin-announce-edit-request-schema.json",
  "title": "AdminAnnounceEditRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cubi-estate-admin-api-openapi.yml#/components/schemas/AdminAnnounceEditRequest",
  "properties": {
    "ref": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "title": "Ref",
      "description": "Announcement to edit: numeric id or its dedup_key."
    },
    "body": {
      "type": "string",
      "title": "Body",
      "description": "New message text (replaces the original)."
    },
    "parse_mode": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Parse Mode",
      "description": "'HTML' (default) or 'none' for plain text.",
      "default": "HTML"
    },
    "disable_preview": {
      "type": "boolean",
      "title": "Disable Preview",
      "description": "Suppress link preview (default true).",
      "default": true
    },
    "button_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Button Url",
      "description": "Re-apply this URL button on the channel post (defaults to TELEGRAM_ANNOUNCE_BUTTON_URL)."
    },
    "button_text": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Button Text",
      "description": "Label for the re-applied channel button."
    },
    "channel_only": {
      "type": "boolean",
      "title": "Channel Only",
      "description": "If true, edit only the channel post, not the subscriber DMs.",
      "default": false
    }
  },
  "type": "object",
  "required": [
    "ref",
    "body"
  ]
}