{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-event-hubs/json-schema/microsoft-azure-event-hubs-batch-event-payload-schema.json",
  "title": "BatchEventPayload",
  "description": "An array of event messages for batch sending. Each message must have a Body field. UserProperties can optionally be included per message.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-event-hubs-events-api-openapi.yml#/components/schemas/BatchEventPayload",
  "type": "array",
  "items": {
    "$ref": "#/$defs/BatchEventMessage"
  },
  "$defs": {
    "BatchEventMessage": {
      "type": "object",
      "description": "A single message within a batch of events.",
      "required": [
        "Body"
      ],
      "properties": {
        "Body": {
          "description": "The body content of the event message.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "additionalProperties": true
            }
          ]
        },
        "UserProperties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Custom properties associated with the event message. These are user-defined key-value pairs."
        },
        "BrokerProperties": {
          "type": "object",
          "description": "Broker-level properties for the message.",
          "properties": {
            "PartitionKey": {
              "type": "string",
              "description": "The partition key used to determine the partition to send the event to."
            },
            "Label": {
              "type": "string",
              "description": "Application-specific label."
            },
            "MessageId": {
              "type": "string",
              "description": "The unique identifier of the message."
            },
            "CorrelationId": {
              "type": "string",
              "description": "The correlation identifier."
            },
            "SessionId": {
              "type": "string",
              "description": "The session identifier."
            },
            "ReplyTo": {
              "type": "string",
              "description": "The address to reply to."
            }
          }
        }
      }
    }
  }
}