{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-chime/json-schema/amazon-chime-send-channel-message-request-schema.json",
  "title": "SendChannelMessageRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-chime-messages-api-openapi.yml#/components/schemas/SendChannelMessageRequest",
  "type": "object",
  "properties": {
    "ChannelArn": {
      "type": "string",
      "description": "The ARN of the channel."
    },
    "Content": {
      "type": "string",
      "description": "The content of the channel message."
    },
    "Type": {
      "type": "string",
      "enum": [
        "STANDARD",
        "CONTROL"
      ],
      "description": "The type of message, STANDARD or CONTROL. STANDARD messages can be up to 4KB in size and contain metadata. Metadata is arbitrary, and you can use it in a variety of ways, such as containing a link to an attachment. CONTROL messages are limited to 30 bytes and do not contain metadata."
    },
    "Persistence": {
      "type": "string",
      "enum": [
        "PERSISTENT",
        "NON_PERSISTENT"
      ],
      "description": "Boolean that controls whether the message is persisted on the back end. Required."
    },
    "Metadata": {
      "type": "string",
      "description": "The optional metadata for each message."
    },
    "ClientRequestToken": {
      "type": "string",
      "description": "The Idempotency token for each client request."
    },
    "ChimeBearer": {
      "type": "string",
      "description": "The ARN of the AppInstanceUser or AppInstanceBot that makes the API call."
    },
    "PushNotification": {
      "$ref": "#/$defs/PushNotificationConfiguration"
    },
    "MessageAttributes": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/MessageAttributeValue"
      },
      "description": "The attributes for the message, used for message filtering along with a FilterRule defined in the PushNotificationPreferences."
    },
    "SubChannelId": {
      "type": "string",
      "description": "The ID of the SubChannel in the request."
    },
    "ContentType": {
      "type": "string",
      "description": "The content type of the channel message."
    },
    "Target": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Target"
      },
      "description": "The target of a message. Must be a member of the channel, such as another user, a bot, or the sender. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see."
    }
  },
  "required": [
    "ChannelArn",
    "Content",
    "Type",
    "Persistence",
    "ClientRequestToken",
    "ChimeBearer"
  ],
  "$defs": {
    "MessageAttributeValue": {
      "type": "object",
      "properties": {
        "StringValues": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The strings in a message attribute value."
        }
      }
    },
    "PushNotificationConfiguration": {
      "type": "object",
      "properties": {
        "Title": {
          "type": "string",
          "description": "The title of the push notification."
        },
        "Body": {
          "type": "string",
          "description": "The body of the push notification."
        },
        "Type": {
          "type": "string",
          "enum": [
            "DEFAULT",
            "VOIP"
          ],
          "description": "Enum value that indicates the type of the push notification for a message. DEFAULT: Normal mobile push notification. VOIP: VOIP mobile push notification."
        }
      }
    },
    "Target": {
      "type": "object",
      "properties": {
        "MemberArn": {
          "type": "string",
          "description": "The ARN of the target channel member."
        }
      }
    }
  }
}