{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-sns/json-schema/amazon-sns-publish-batch-input-schema.json",
  "title": "PublishBatchInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-sns-publishing-api-openapi.yml#/components/schemas/PublishBatchInput",
  "type": "object",
  "properties": {
    "TopicArn": {
      "type": "string",
      "description": "The Amazon resource name (ARN) of the topic you want to batch publish to."
    },
    "PublishBatchRequestEntries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublishBatchRequestEntry"
      },
      "description": "A list of PublishBatch request entries to be sent to the SNS topic."
    }
  },
  "required": [
    "TopicArn",
    "PublishBatchRequestEntries"
  ],
  "$defs": {
    "MessageAttributeValue": {
      "type": "object",
      "properties": {
        "DataType": {
          "type": "string",
          "description": "Amazon SNS supports the following logical data types: String, String.Array, Number, and Binary. For more information, see Message Attribute Data Types."
        },
        "StringValue": {
          "type": "string",
          "description": "Strings are Unicode with UTF8 binary encoding. For a list of code values, see ASCII Printable Characters."
        },
        "BinaryValue": {
          "type": "string",
          "format": "byte",
          "description": "Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images."
        }
      },
      "required": [
        "DataType"
      ]
    },
    "PublishBatchRequestEntry": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string",
          "description": "An identifier for the message in this batch. The Ids of a batch request must be unique within a request. This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_)."
        },
        "Message": {
          "type": "string",
          "description": "The body of the message."
        },
        "Subject": {
          "type": "string",
          "description": "The subject of the batch message."
        },
        "MessageStructure": {
          "type": "string",
          "description": "Set MessageStructure to json if you want to send a different message for each protocol. For example, using one publish action, you can send a short message to your SMS subscribers and a longer message to your email subscribers. If you set MessageStructure to json, the value of the Message parameter must: be a syntactically valid JSON object; and contain at least a top-level JSON key of \"default\" with a value that is a string. You can define other top-level keys that define the message you want to send to a specific transport protocol (for example, http)."
        },
        "MessageAttributes": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/MessageAttributeValue"
          },
          "description": "Each message attribute consists of a Name, Type, and Value. For more information, see Amazon SNS message attributes in the Amazon SNS Developer Guide."
        },
        "MessageDeduplicationId": {
          "type": "string",
          "description": "This parameter applies only to FIFO (first-in-first-out) topics. This parameter applies only to FIFO (first-in-first-out) topics. The MessageDeduplicationId can contain up to 128 alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!\"#$%&'()*+,-./:;?@[\\]^_`{|}~). Every message must have a unique MessageDeduplicationId, which is a token used for deduplication of sent messages within the 5 minute minimum deduplication interval. The scope of deduplication depends on the FifoThroughputScope attribute, when set to Topic the message deduplication scope is across the entire topic, when set to Mes"
        },
        "MessageGroupId": {
          "type": "string",
          "description": "FIFO topics: The tag that specifies that a message belongs to a specific message group. Messages that belong to the same message group are processed in a FIFO manner (however, messages in different message groups might be processed out of order). To interleave multiple ordered streams within a single topic, use MessageGroupId values (for example, session data for multiple users). In this scenario, multiple consumers can process the topic, but the session data of each user is processed in a FIFO fashion. You must associate a non-empty MessageGroupId with a message. If you do not provide a Messa"
        }
      },
      "required": [
        "Id",
        "Message"
      ]
    }
  }
}