Amazon SNS · Schema

PublishInput

Amazon Web ServicesEmailMessagingNotificationPub/SubPush NotificationsSMS

Properties

Name Type Description
TopicArn string The topic you want to publish to. If you don't specify a value for the TopicArn parameter, you must specify a value for the PhoneNumber or TargetArn parameters.
TargetArn string If you don't specify a value for the TargetArn parameter, you must specify a value for the PhoneNumber or TopicArn parameters.
PhoneNumber string The phone number to which you want to deliver an SMS message. Use E.164 format. If you don't specify a value for the PhoneNumber parameter, you must specify a value for the TargetArn or TopicArn param
Message string The message you want to send. If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send
Subject string Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other end
MessageStructure string 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
MessageAttributes object Message attributes for Publish action.
MessageDeduplicationId string 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 (!"#$%&'()*+,-./:;?@[\]^_`{|}~
MessageGroupId string The MessageGroupId can contain up to 128 alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;?@[\]^_`{|}~). For FIFO topics: The MessageGroupId is a tag that specifies that a mes
View JSON Schema on GitHub

JSON Schema

amazon-sns-publish-input-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-sns/json-schema/amazon-sns-publish-input-schema.json",
  "title": "PublishInput",
  "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/PublishInput",
  "type": "object",
  "properties": {
    "TopicArn": {
      "type": "string",
      "description": "The topic you want to publish to. If you don't specify a value for the TopicArn parameter, you must specify a value for the PhoneNumber or TargetArn parameters."
    },
    "TargetArn": {
      "type": "string",
      "description": "If you don't specify a value for the TargetArn parameter, you must specify a value for the PhoneNumber or TopicArn parameters."
    },
    "PhoneNumber": {
      "type": "string",
      "description": "The phone number to which you want to deliver an SMS message. Use E.164 format. If you don't specify a value for the PhoneNumber parameter, you must specify a value for the TargetArn or TopicArn parameters."
    },
    "Message": {
      "type": "string",
      "description": "The message you want to send. If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure parameter to json and use a JSON object for the Message parameter. Constraints: With the exception of SMS, messages must be UTF-8 encoded strings. By default, a message can be at most 256 KiB in size (262,144 bytes, not 262,144 characters). When you publish to a topic, the maximum size is determined by the topic'"
    },
    "Subject": {
      "type": "string",
      "description": "Optional parameter to be used as the \"Subject\" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints. Constraints: Subjects must be UTF-8 text with no line breaks or control characters, and less than 100 characters long."
    },
    "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 (e.g., \"http\"). Valid value: json"
    },
    "MessageAttributes": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/MessageAttributeValue"
      },
      "description": "Message attributes for Publish action."
    },
    "MessageDeduplicationId": {
      "type": "string",
      "description": "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 MessageGroup the message deduplication scope is within each individu"
    },
    "MessageGroupId": {
      "type": "string",
      "description": "The MessageGroupId can contain up to 128 alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!\"#$%&'()*+,-./:;?@[\\]^_`{|}~). For FIFO topics: The MessageGroupId is a 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). Every message must include a MessageGroupId. For standard topics: The MessageGroupId is optional and is forwarded only to Amazon SQS standard subscriptions to activate fair queues. The MessageGroupId"
    }
  },
  "required": [
    "Message"
  ],
  "$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"
      ]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/amazon-sns-publish-input"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.