{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/telegram/json-schema/telegram-message-response-schema.json",
  "title": "MessageResponse",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telegram-message-editing-api-openapi.yml#/components/schemas/MessageResponse",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "result": {
      "$ref": "#/$defs/Message"
    }
  },
  "$defs": {
    "Chat": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Unique identifier for this chat"
        },
        "type": {
          "type": "string",
          "enum": [
            "private",
            "group",
            "supergroup",
            "channel"
          ],
          "description": "Type of chat"
        },
        "title": {
          "type": "string",
          "description": "Title for supergroups, channels and group chats"
        },
        "username": {
          "type": "string",
          "description": "Username for private chats, supergroups and channels"
        },
        "first_name": {
          "type": "string",
          "description": "First name of the other party in a private chat"
        },
        "last_name": {
          "type": "string",
          "description": "Last name of the other party in a private chat"
        },
        "description": {
          "type": "string",
          "description": "Description for groups, supergroups and channel chats"
        },
        "invite_link": {
          "type": "string",
          "description": "Primary invite link for the chat"
        },
        "member_count": {
          "type": "integer",
          "description": "Number of members in a chat"
        }
      },
      "required": [
        "id",
        "type"
      ]
    },
    "Message": {
      "type": "object",
      "properties": {
        "message_id": {
          "type": "integer",
          "description": "Unique message identifier inside a chat"
        },
        "from": {
          "$ref": "#/$defs/User"
        },
        "chat": {
          "$ref": "#/$defs/Chat"
        },
        "date": {
          "type": "integer",
          "description": "Date the message was sent in Unix time"
        },
        "text": {
          "type": "string",
          "description": "For text messages, the actual UTF-8 text of the message"
        },
        "caption": {
          "type": "string",
          "description": "Caption for the animation, audio, document, photo, video or voice"
        }
      },
      "required": [
        "message_id",
        "date",
        "chat"
      ]
    },
    "User": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Unique identifier for this user or bot"
        },
        "is_bot": {
          "type": "boolean",
          "description": "True if this user is a bot"
        },
        "first_name": {
          "type": "string",
          "description": "User's or bot's first name"
        },
        "last_name": {
          "type": "string",
          "description": "User's or bot's last name"
        },
        "username": {
          "type": "string",
          "description": "User's or bot's username"
        },
        "language_code": {
          "type": "string",
          "description": "IETF language tag of the user's language"
        },
        "is_premium": {
          "type": "boolean",
          "description": "True if this user is a Telegram Premium user"
        }
      },
      "required": [
        "id",
        "is_bot",
        "first_name"
      ]
    }
  }
}