{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/youtube/json-schema/youtube-live-chat-message-schema.json",
  "title": "LiveChatMessage",
  "description": "A *liveChatMessage* resource represents a chat message in a YouTube Live Chat.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/youtube-youtube-live-chat-messages-api-openapi.yml#/components/schemas/LiveChatMessage",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID that YouTube assigns to uniquely identify the message."
    },
    "authorDetails": {
      "$ref": "#/$defs/LiveChatMessageAuthorDetails",
      "description": "The authorDetails object contains basic details about the user that posted this message."
    },
    "snippet": {
      "$ref": "#/$defs/LiveChatMessageSnippet",
      "description": "The snippet object contains basic details about the message."
    },
    "kind": {
      "type": "string",
      "description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#liveChatMessage\".",
      "default": "youtube#liveChatMessage"
    },
    "etag": {
      "description": "Etag of this resource.",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "ChannelProfileDetails": {
      "properties": {
        "channelId": {
          "description": "The YouTube channel ID.",
          "type": "string"
        },
        "displayName": {
          "description": "The channel's display name.",
          "type": "string"
        },
        "channelUrl": {
          "description": "The channel's URL.",
          "type": "string"
        },
        "profileImageUrl": {
          "type": "string",
          "description": "The channels's avatar URL."
        }
      },
      "type": "object"
    },
    "LiveChatFanFundingEventDetails": {
      "properties": {
        "amountDisplayString": {
          "type": "string",
          "description": "A rendered string that displays the fund amount and currency to the user."
        },
        "amountMicros": {
          "description": "The amount of the fund.",
          "type": "string",
          "format": "uint64"
        },
        "userComment": {
          "description": "The comment added by the user to this fan funding event.",
          "type": "string"
        },
        "currency": {
          "description": "The currency in which the fund was made.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "LiveChatGiftDetails": {
      "description": "Details about the gift event, this is only set if the type is `giftEvent`.",
      "type": "object",
      "properties": {
        "giftName": {
          "type": "string",
          "description": "The name of the gift."
        },
        "hasVisualEffect": {
          "description": "Whether the gift involves a visual effect.",
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "description": "The BCP-47 language code of the gift."
        },
        "jewelsAmount": {
          "format": "int32",
          "description": "The value of the gift in jewels.",
          "type": "integer"
        },
        "giftDuration": {
          "format": "google-duration",
          "type": "string",
          "description": "The duration of the gift."
        },
        "giftUrl": {
          "type": "string",
          "description": "The URL of the gift image."
        },
        "altText": {
          "type": "string",
          "description": "The alternative text to be used for accessibility."
        },
        "comboCount": {
          "type": "integer",
          "description": "The number of times the gift has been sent in a row.",
          "format": "int32"
        }
      }
    },
    "LiveChatGiftMembershipReceivedDetails": {
      "type": "object",
      "properties": {
        "associatedMembershipGiftingMessageId": {
          "description": "The ID of the membership gifting message that is related to this gift membership. This ID will always refer to a message whose type is `membershipGiftingEvent`.",
          "type": "string"
        },
        "memberLevelName": {
          "description": "The name of the Level at which the viewer is a member. This matches the `snippet.membershipGiftingDetails.giftMembershipsLevelName` of the associated membership gifting message. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled.",
          "type": "string"
        },
        "gifterChannelId": {
          "type": "string",
          "description": "The ID of the user that made the membership gifting purchase. This matches the `snippet.authorChannelId` of the associated membership gifting message."
        }
      }
    },
    "LiveChatMemberMilestoneChatDetails": {
      "type": "object",
      "properties": {
        "memberLevelName": {
          "description": "The name of the Level at which the viever is a member. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled.",
          "type": "string"
        },
        "memberMonth": {
          "type": "integer",
          "description": "The total amount of months (rounded up) the viewer has been a member that granted them this Member Milestone Chat. This is the same number of months as is being displayed to YouTube users.",
          "format": "uint32"
        },
        "userComment": {
          "type": "string",
          "description": "The comment added by the member to this Member Milestone Chat. This field is empty for messages without a comment from the member."
        }
      }
    },
    "LiveChatMembershipGiftingDetails": {
      "type": "object",
      "properties": {
        "giftMembershipsCount": {
          "type": "integer",
          "description": "The number of gift memberships purchased by the user.",
          "format": "int32"
        },
        "giftMembershipsLevelName": {
          "type": "string",
          "description": "The name of the level of the gift memberships purchased by the user. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled."
        }
      }
    },
    "LiveChatMessageAuthorDetails": {
      "properties": {
        "channelId": {
          "description": "The YouTube channel ID.",
          "type": "string"
        },
        "profileImageUrl": {
          "description": "The channels's avatar URL.",
          "type": "string"
        },
        "channelUrl": {
          "type": "string",
          "description": "The channel's URL."
        },
        "isChatOwner": {
          "type": "boolean",
          "description": "Whether the author is the owner of the live chat."
        },
        "isVerified": {
          "description": "Whether the author's identity has been verified by YouTube.",
          "type": "boolean"
        },
        "displayName": {
          "type": "string",
          "description": "The channel's display name."
        },
        "isChatSponsor": {
          "description": "Whether the author is a sponsor of the live chat.",
          "type": "boolean"
        },
        "isChatModerator": {
          "description": "Whether the author is a moderator of the live chat.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "LiveChatMessageDeletedDetails": {
      "properties": {
        "deletedMessageId": {
          "type": "string"
        }
      },
      "type": "object",
      "deprecated": true
    },
    "LiveChatMessageRetractedDetails": {
      "type": "object",
      "properties": {
        "retractedMessageId": {
          "type": "string"
        }
      },
      "deprecated": true
    },
    "LiveChatMessageSnippet": {
      "type": "object",
      "properties": {
        "newSponsorDetails": {
          "$ref": "#/$defs/LiveChatNewSponsorDetails",
          "description": "Details about the New Member Announcement event, this is only set if the type is `newSponsorEvent`. The term \"member\" replaces \"sponsor\"."
        },
        "authorChannelId": {
          "description": "The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor memberMilestoneChatEvent - the member that sent the message membershipGiftingEvent - the user that made the purchase giftMembershipReceivedEvent - the user that received the gift membership messageDeletedEvent - the moderator that took the action. Unused. messageRetractedEvent - the author that retracted their message. Unused. userBannedEvent - the moderator that took the action superChatEvent - the user that made the purchase superStickerEvent - the user that made the purchase pollEvent - the user that created the poll",
          "type": "string"
        },
        "messageDeletedDetails": {
          "$ref": "#/$defs/LiveChatMessageDeletedDetails"
        },
        "publishedAt": {
          "type": "string",
          "description": "The date and time when the message was orignally published.",
          "format": "date-time"
        },
        "liveChatId": {
          "type": "string"
        },
        "fanFundingEventDetails": {
          "$ref": "#/$defs/LiveChatFanFundingEventDetails",
          "description": "Details about the funding event, this is only set if the type is `fanFundingEvent`."
        },
        "superStickerDetails": {
          "$ref": "#/$defs/LiveChatSuperStickerDetails",
          "description": "Details about the Super Sticker event, this is only set if the type is `superStickerEvent`."
        },
        "superChatDetails": {
          "$ref": "#/$defs/LiveChatSuperChatDetails",
          "description": "Details about the Super Chat event, this is only set if the type is `superChatEvent`."
        },
        "userBannedDetails": {
          "$ref": "#/$defs/LiveChatUserBannedMessageDetails"
        },
        "textMessageDetails": {
          "$ref": "#/$defs/LiveChatTextMessageDetails",
          "description": "Details about the text message, this is only set if the type is `textMessageEvent`."
        },
        "displayMessage": {
          "type": "string",
          "description": "Contains a string that can be displayed to the user. If this field is not present the message is silent, at the moment only messages of type TOMBSTONE and CHAT_ENDED_EVENT are silent."
        },
        "hasDisplayContent": {
          "type": "boolean",
          "description": "Whether the message has display content that should be displayed to users."
        },
        "type": {
          "description": "The type of message, this will always be present, it determines the contents of the message as well as which fields will be present.",
          "type": "string",
          "enum": [
            "invalidType",
            "textMessageEvent",
            "tombstone",
            "fanFundingEvent",
            "chatEndedEvent",
            "sponsorOnlyModeStartedEvent",
            "sponsorOnlyModeEndedEvent",
            "newSponsorEvent",
            "memberMilestoneChatEvent",
            "membershipGiftingEvent",
            "giftMembershipReceivedEvent",
            "messageDeletedEvent",
            "messageRetractedEvent",
            "userBannedEvent",
            "superChatEvent",
            "superStickerEvent",
            "pollEvent",
            "giftEvent"
          ]
        },
        "giftMembershipReceivedDetails": {
          "$ref": "#/$defs/LiveChatGiftMembershipReceivedDetails",
          "description": "Details about the Gift Membership Received event, this is only set if the type is `giftMembershipReceivedEvent`."
        },
        "membershipGiftingDetails": {
          "$ref": "#/$defs/LiveChatMembershipGiftingDetails",
          "description": "Details about the Membership Gifting event, this is only set if the type is `membershipGiftingEvent`."
        },
        "pollDetails": {
          "$ref": "#/$defs/LiveChatPollDetails",
          "description": "Details about the poll event, this is only set if the type is `pollEvent`."
        },
        "messageRetractedDetails": {
          "$ref": "#/$defs/LiveChatMessageRetractedDetails"
        },
        "memberMilestoneChatDetails": {
          "$ref": "#/$defs/LiveChatMemberMilestoneChatDetails",
          "description": "Details about the Member Milestone Chat event, this is only set if the type is `memberMilestoneChatEvent`."
        },
        "giftDetails": {
          "$ref": "#/$defs/LiveChatGiftDetails",
          "description": "Details about the gift event, this is only set if the type is `giftEvent`."
        }
      },
      "description": "Next ID: 35"
    },
    "LiveChatNewSponsorDetails": {
      "properties": {
        "memberLevelName": {
          "type": "string",
          "description": "The name of the Level that the viewer just had joined. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled."
        },
        "isUpgrade": {
          "description": "If the viewer just had upgraded from a lower level. For viewers that were not members at the time of purchase, this field is false.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "LiveChatPollDetails": {
      "type": "object",
      "properties": {
        "status": {
          "enum": [
            "unknown",
            "active",
            "closed"
          ],
          "type": "string"
        },
        "metadata": {
          "$ref": "#/$defs/LiveChatPollDetailsPollMetadata"
        }
      }
    },
    "LiveChatPollDetailsPollMetadata": {
      "type": "object",
      "properties": {
        "options": {
          "description": "The options will be returned in the order that is displayed in 1P",
          "type": "array",
          "items": {
            "$ref": "#/$defs/LiveChatPollDetailsPollMetadataPollOption"
          }
        },
        "questionText": {
          "type": "string"
        }
      }
    },
    "LiveChatPollDetailsPollMetadataPollOption": {
      "type": "object",
      "properties": {
        "optionText": {
          "type": "string"
        },
        "tally": {
          "format": "int64",
          "type": "string"
        }
      }
    },
    "LiveChatSuperChatDetails": {
      "properties": {
        "amountDisplayString": {
          "type": "string",
          "description": "A rendered string that displays the fund amount and currency to the user."
        },
        "currency": {
          "description": "The currency in which the purchase was made.",
          "type": "string"
        },
        "tier": {
          "format": "uint32",
          "type": "integer",
          "description": "The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is `1`."
        },
        "amountMicros": {
          "format": "uint64",
          "type": "string",
          "description": "The amount purchased by the user, in micros (1,750,000 micros = 1.75)."
        },
        "userComment": {
          "type": "string",
          "description": "The comment added by the user to this Super Chat event."
        }
      },
      "type": "object"
    },
    "LiveChatSuperStickerDetails": {
      "type": "object",
      "properties": {
        "amountMicros": {
          "type": "string",
          "description": "The amount purchased by the user, in micros (1,750,000 micros = 1.75).",
          "format": "uint64"
        },
        "currency": {
          "type": "string",
          "description": "The currency in which the purchase was made."
        },
        "superStickerMetadata": {
          "$ref": "#/$defs/SuperStickerMetadata",
          "description": "Information about the Super Sticker."
        },
        "tier": {
          "type": "integer",
          "format": "uint32",
          "description": "The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is `1`."
        },
        "amountDisplayString": {
          "type": "string",
          "description": "A rendered string that displays the fund amount and currency to the user."
        }
      }
    },
    "LiveChatTextMessageDetails": {
      "type": "object",
      "properties": {
        "messageText": {
          "type": "string",
          "description": "The user's message."
        }
      }
    },
    "LiveChatUserBannedMessageDetails": {
      "type": "object",
      "properties": {
        "bannedUserDetails": {
          "$ref": "#/$defs/ChannelProfileDetails",
          "description": "The details of the user that was banned."
        },
        "banType": {
          "enum": [
            "permanent",
            "temporary"
          ],
          "description": "The type of ban.",
          "type": "string"
        },
        "banDurationSeconds": {
          "type": "string",
          "description": "The duration of the ban. This property is only present if the `banType` is `temporary`.",
          "format": "uint64"
        }
      }
    },
    "SuperStickerMetadata": {
      "properties": {
        "altText": {
          "description": "Internationalized alt text that describes the sticker image and any animation associated with it.",
          "type": "string"
        },
        "stickerId": {
          "description": "Unique identifier of the Super Sticker. This is a shorter form of the alt_text that includes pack name and a recognizable characteristic of the sticker.",
          "type": "string"
        },
        "altTextLanguage": {
          "description": "Specifies the localization language in which the alt text is returned.",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}