{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-exchange/json-schema/microsoft-exchange-message-collection-response-schema.json",
  "title": "MessageCollectionResponse",
  "description": "Collection of messages",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-exchange-mail-folders-api-openapi.yml#/components/schemas/MessageCollectionResponse",
  "type": "object",
  "properties": {
    "@odata.context": {
      "type": "string"
    },
    "@odata.nextLink": {
      "type": "string",
      "format": "uri",
      "description": "URL to get the next set of results"
    },
    "value": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Message"
      }
    }
  },
  "$defs": {
    "DateTimeTimeZone": {
      "type": "object",
      "description": "Describes the date, time, and time zone of a point in time",
      "properties": {
        "dateTime": {
          "type": "string",
          "description": "A date and time combined in ISO 8601 format"
        },
        "timeZone": {
          "type": "string",
          "description": "Represents a time zone (e.g. Pacific Standard Time)"
        }
      }
    },
    "EmailAddress": {
      "type": "object",
      "description": "Represents the name and email address of a contact or message recipient",
      "properties": {
        "name": {
          "type": "string",
          "description": "The display name of the person or entity"
        },
        "address": {
          "type": "string",
          "format": "email",
          "description": "The email address of the person or entity"
        }
      }
    },
    "FollowupFlag": {
      "type": "object",
      "description": "Follow-up flag on a message",
      "properties": {
        "completedDateTime": {
          "$ref": "#/$defs/DateTimeTimeZone"
        },
        "dueDateTime": {
          "$ref": "#/$defs/DateTimeTimeZone"
        },
        "startDateTime": {
          "$ref": "#/$defs/DateTimeTimeZone"
        },
        "flagStatus": {
          "type": "string",
          "enum": [
            "notFlagged",
            "complete",
            "flagged"
          ],
          "description": "The status of the follow-up flag"
        }
      }
    },
    "InternetMessageHeader": {
      "type": "object",
      "description": "A key-value pair representing an Internet message header",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the message header"
        },
        "value": {
          "type": "string",
          "description": "The value of the message header"
        }
      }
    },
    "ItemBody": {
      "type": "object",
      "description": "Represents the body of a message or event",
      "properties": {
        "contentType": {
          "type": "string",
          "enum": [
            "text",
            "html"
          ],
          "description": "The type of the content"
        },
        "content": {
          "type": "string",
          "description": "The content of the item body"
        }
      }
    },
    "Message": {
      "type": "object",
      "description": "A message in a mailFolder",
      "properties": {
        "id": {
          "type": "string",
          "readOnly": true,
          "description": "Unique identifier for the message"
        },
        "subject": {
          "type": "string",
          "description": "The subject of the message"
        },
        "body": {
          "$ref": "#/$defs/ItemBody"
        },
        "bodyPreview": {
          "type": "string",
          "readOnly": true,
          "description": "The first 255 characters of the message body in text format"
        },
        "from": {
          "$ref": "#/$defs/Recipient"
        },
        "sender": {
          "$ref": "#/$defs/Recipient"
        },
        "toRecipients": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Recipient"
          },
          "description": "The To: recipients for the message"
        },
        "ccRecipients": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Recipient"
          },
          "description": "The Cc: recipients for the message"
        },
        "bccRecipients": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Recipient"
          },
          "description": "The Bcc: recipients for the message"
        },
        "replyTo": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Recipient"
          },
          "description": "The email addresses to use when replying"
        },
        "conversationId": {
          "type": "string",
          "description": "The ID of the conversation the email belongs to"
        },
        "conversationIndex": {
          "type": "string",
          "format": "byte",
          "description": "Indicates the position of the message within the conversation"
        },
        "createdDateTime": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "description": "The date and time the message was created in ISO 8601 UTC format"
        },
        "lastModifiedDateTime": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "description": "The date and time the message was last changed in ISO 8601 UTC format"
        },
        "receivedDateTime": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "description": "The date and time the message was received in ISO 8601 UTC format"
        },
        "sentDateTime": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "description": "The date and time the message was sent in ISO 8601 UTC format"
        },
        "hasAttachments": {
          "type": "boolean",
          "readOnly": true,
          "description": "Indicates whether the message has attachments (excludes inline attachments)"
        },
        "importance": {
          "type": "string",
          "enum": [
            "low",
            "normal",
            "high"
          ],
          "description": "The importance of the message"
        },
        "inferenceClassification": {
          "type": "string",
          "enum": [
            "focused",
            "other"
          ],
          "description": "The classification of the message for the user based on inferred relevance or importance"
        },
        "internetMessageId": {
          "type": "string",
          "description": "The message ID in the format specified by RFC2822"
        },
        "internetMessageHeaders": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InternetMessageHeader"
          },
          "readOnly": true,
          "description": "A collection of message headers defined by RFC5322"
        },
        "isDeliveryReceiptRequested": {
          "type": "boolean",
          "description": "Indicates whether a delivery receipt is requested"
        },
        "isDraft": {
          "type": "boolean",
          "readOnly": true,
          "description": "Indicates whether the message is a draft"
        },
        "isRead": {
          "type": "boolean",
          "description": "Indicates whether the message has been read"
        },
        "isReadReceiptRequested": {
          "type": "boolean",
          "description": "Indicates whether a read receipt is requested"
        },
        "parentFolderId": {
          "type": "string",
          "readOnly": true,
          "description": "The unique identifier for the message's parent mailFolder"
        },
        "webLink": {
          "type": "string",
          "format": "uri",
          "readOnly": true,
          "description": "The URL to open the message in Outlook on the web"
        },
        "flag": {
          "$ref": "#/$defs/FollowupFlag"
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The categories associated with the message"
        },
        "changeKey": {
          "type": "string",
          "readOnly": true,
          "description": "The version of the message"
        },
        "uniqueBody": {
          "$ref": "#/$defs/ItemBody"
        }
      }
    },
    "Recipient": {
      "type": "object",
      "description": "Represents an email recipient",
      "properties": {
        "emailAddress": {
          "$ref": "#/$defs/EmailAddress"
        }
      }
    }
  }
}