Microsoft Graph · Schema

microsoft.graph.chatMessage

Azure ADCollaborationContactsDocumentsEmailGraphIdentityMicrosoftOffice 365PresentationsProductivitySpreadsheetsT1Tasks
View JSON Schema on GitHub

JSON Schema

microsoft-graph-microsoftgraphchatmessage-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/microsoft.graph.chatMessage",
  "title": "microsoft.graph.chatMessage",
  "allOf": [
    {
      "$ref": "#/components/schemas/microsoft.graph.entity"
    },
    {
      "title": "chatMessage",
      "required": [
        "@odata.type"
      ],
      "type": "object",
      "properties": {
        "attachments": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/microsoft.graph.chatMessageAttachment"
          },
          "description": "References to attached objects like files, tabs, meetings etc."
        },
        "body": {
          "$ref": "#/components/schemas/microsoft.graph.itemBody"
        },
        "channelIdentity": {
          "anyOf": [
            {
              "$ref": "#/components/schemas/microsoft.graph.channelIdentity"
            },
            {
              "type": "object",
              "nullable": true
            }
          ],
          "description": "If the message was sent in a channel, represents identity of the channel."
        },
        "chatId": {
          "type": "string",
          "description": "If the message was sent in a chat, represents the identity of the chat.",
          "nullable": true
        },
        "createdDateTime": {
          "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$",
          "type": "string",
          "description": "Timestamp of when the chat message was created.",
          "format": "date-time",
          "nullable": true
        },
        "deletedDateTime": {
          "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$",
          "type": "string",
          "description": "Read only. Timestamp at which the chat message was deleted, or null if not deleted.",
          "format": "date-time",
          "nullable": true
        },
        "etag": {
          "type": "string",
          "description": "Read-only. Version number of the chat message.",
          "nullable": true
        },
        "eventDetail": {
          "anyOf": [
            {
              "$ref": "#/components/schemas/microsoft.graph.eventMessageDetail"
            },
            {
              "type": "object",
              "nullable": true
            }
          ],
          "description": "Read-only. If present, represents details of an event that happened in a chat, a channel, or a team, for example, adding new members. For event messages, the messageType property will be set to systemEventMessage."
        },
        "from": {
          "anyOf": [
            {
              "$ref": "#/components/schemas/microsoft.graph.chatMessageFromIdentitySet"
            },
            {
              "type": "object",
              "nullable": true
            }
          ],
          "description": "Details of the sender of the chat message. Can only be set during migration."
        },
        "importance": {
          "$ref": "#/components/schemas/microsoft.graph.chatMessageImportance"
        },
        "lastEditedDateTime": {
          "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$",
          "type": "string",
          "description": "Read only. Timestamp when edits to the chat message were made. Triggers an 'Edited' flag in the Teams UI. If no edits are made the value is null.",
          "format": "date-time",
          "nullable": true
        },
        "lastModifiedDateTime": {
          "pattern": "^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$",
          "type": "string",
          "description": "Read only. Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed.",
          "format": "date-time",
          "nullable": true
        },
        "locale": {
          "type": "string",
          "description": "Locale of the chat message set by the client. Always set to en-us."
        },
        "mentions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/microsoft.graph.chatMessageMention"
          },
          "description": "List of entities mentioned in the chat message. Supported entities are: user, bot, team, channel, chat, and tag."
        },
        "messageHistory": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/microsoft.graph.chatMessageHistoryItem"
          },
          "description": "List of activity history of a message item, including modification time and actions, such as reactionAdded, reactionRemoved, or reaction changes, on the message."
        },
        "messageType": {
          "$ref": "#/components/schemas/microsoft.graph.chatMessageType"
        },
        "policyViolation": {
          "anyOf": [
            {
              "$ref": "#/components/schemas/microsoft.graph.chatMessagePolicyViolation"
            },
            {
              "type": "object",
              "nullable": true
            }
          ],
          "description": "Defines the properties of a policy violation set by a data loss prevention (DLP) application."
        },
        "reactions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/microsoft.graph.chatMessageReaction"
          },
          "description": "Reactions for this chat message (for example, Like)."
        },
        "replyToId": {
          "type": "string",
          "description": "Read-only. ID of the parent chat message or root chat message of the thread. (Only applies to chat messages in channels, not chats.)",
          "nullable": true
        },
        "subject": {
          "type": "string",
          "description": "The subject of the chat message, in plaintext.",
          "nullable": true
        },
        "summary": {
          "type": "string",
          "description": "Summary text of the chat message that could be used for push notifications and summary views or fall back views. Only applies to channel chat messages, not chat messages in a chat.",
          "nullable": true
        },
        "webUrl": {
          "type": "string",
          "description": "Read-only. Link to the message in Microsoft Teams.",
          "nullable": true
        },
        "hostedContents": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/microsoft.graph.chatMessageHostedContent"
          },
          "description": "Content in a message hosted by Microsoft Teams - for example, images or code snippets.",
          "x-ms-navigationProperty": true
        },
        "replies": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/microsoft.graph.chatMessage"
          },
          "description": "Replies for a specified message. Supports $expand for channel messages.",
          "x-ms-navigationProperty": true
        },
        "@odata.type": {
          "type": "string"
        }
      }
    }
  ],
  "x-ms-discriminator-value": "#microsoft.graph.chatMessage"
}