{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/AiInteraction",
  "title": "AiInteraction",
  "type": "object",
  "description": "Represents an interaction between a user and Copilot across Microsoft 365 applications.",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier for the interaction message.",
      "example": "abc123"
    },
    "appClass": {
      "type": "string",
      "description": "The data source for Copilot data. For example, IPM.SkypeTeams.Message.Copilot.Excel or IPM.SkypeTeams.Message.Copilot.Loop.",
      "example": "example_value"
    },
    "body": {
      "$ref": "#/components/schemas/ItemBody"
    },
    "interactionType": {
      "type": "string",
      "enum": [
        "userPrompt",
        "aiResponse",
        "unknownFutureValue"
      ],
      "description": "Indicates whether the interaction is a user prompt or a Copilot response.",
      "example": "userPrompt"
    },
    "conversationType": {
      "type": "string",
      "description": "The type of the conversation (e.g., appchat, bizchat).",
      "example": "example_value"
    },
    "requestId": {
      "type": "string",
      "description": "Identifier that groups a user prompt with its corresponding Copilot response.",
      "example": "500123"
    },
    "sessionId": {
      "type": "string",
      "description": "Thread ID or conversation identifier that maps to all Copilot sessions for the user.",
      "example": "500123"
    },
    "createdDateTime": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the interaction was created.",
      "example": "2026-01-15T10:30:00Z"
    },
    "etag": {
      "type": "string",
      "description": "Timestamp of when the interaction was last modified.",
      "example": "example_value"
    },
    "locale": {
      "type": "string",
      "description": "The locale of the sender.",
      "example": "example_value"
    },
    "from": {
      "$ref": "#/components/schemas/IdentitySet"
    },
    "attachments": {
      "type": "array",
      "description": "Collection of documents attached to the interaction, such as cards and images.",
      "items": {
        "$ref": "#/components/schemas/AiInteractionAttachment"
      },
      "example": []
    },
    "contexts": {
      "type": "array",
      "description": "Identifiers that map to all contexts associated with the interaction.",
      "items": {
        "$ref": "#/components/schemas/AiInteractionContext"
      },
      "example": []
    },
    "links": {
      "type": "array",
      "description": "Collection of links that appear in the interaction.",
      "items": {
        "$ref": "#/components/schemas/AiInteractionLink"
      },
      "example": []
    },
    "mentions": {
      "type": "array",
      "description": "Collection of entities mentioned in the interaction, including users and bots.",
      "items": {
        "$ref": "#/components/schemas/AiInteractionMention"
      },
      "example": []
    }
  }
}