{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-chime/json-schema/amazon-chime-create-channel-request-schema.json",
  "title": "CreateChannelRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-chime-channels-api-openapi.yml#/components/schemas/CreateChannelRequest",
  "type": "object",
  "properties": {
    "AppInstanceArn": {
      "type": "string",
      "description": "The ARN of the channel request."
    },
    "Name": {
      "type": "string",
      "description": "The name of the channel."
    },
    "Mode": {
      "type": "string",
      "enum": [
        "UNRESTRICTED",
        "RESTRICTED"
      ],
      "description": "The channel mode: UNRESTRICTED or RESTRICTED. Administrators, moderators, and channel members can add themselves and other members to unrestricted channels. Only administrators and moderators can add members to restricted channels."
    },
    "Privacy": {
      "type": "string",
      "enum": [
        "PUBLIC",
        "PRIVATE"
      ],
      "description": "The channel's privacy level: PUBLIC or PRIVATE. Private channels aren't discoverable by users outside the channel. Public channels are discoverable by anyone in the AppInstance."
    },
    "Metadata": {
      "type": "string",
      "description": "The metadata of the creation request. Limited to 1KB and UTF-8."
    },
    "ClientRequestToken": {
      "type": "string",
      "description": "The client token for the request. An Idempotency token."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MessagingChimeTag"
      },
      "description": "The tags for the creation request."
    },
    "ChimeBearer": {
      "type": "string",
      "description": "The ARN of the AppInstanceUser or AppInstanceBot that makes the API call."
    },
    "ChannelId": {
      "type": "string",
      "description": "An ID for the channel being created. If you do not specify an ID, a UUID will be created for the channel."
    },
    "MemberArns": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The ARNs of the channel members in the request."
    },
    "ModeratorArns": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The ARNs of the channel moderators in the request."
    },
    "ElasticChannelConfiguration": {
      "$ref": "#/$defs/ElasticChannelConfiguration"
    },
    "ExpirationSettings": {
      "$ref": "#/$defs/ExpirationSettings"
    }
  },
  "required": [
    "AppInstanceArn",
    "Name",
    "ClientRequestToken",
    "ChimeBearer"
  ],
  "$defs": {
    "ElasticChannelConfiguration": {
      "type": "object",
      "properties": {
        "MaximumSubChannels": {
          "type": "integer",
          "description": "The maximum number of SubChannels that you want to allow in the elastic channel."
        },
        "TargetMembershipsPerSubChannel": {
          "type": "integer",
          "description": "The maximum number of members allowed in a SubChannel."
        },
        "MinimumMembershipPercentage": {
          "type": "integer",
          "description": "The minimum allowed percentage of TargetMembershipsPerSubChannel users. Ceil of the calculated value is used in balancing members among SubChannels of the elastic channel."
        }
      },
      "required": [
        "MaximumSubChannels",
        "TargetMembershipsPerSubChannel",
        "MinimumMembershipPercentage"
      ]
    },
    "ExpirationSettings": {
      "type": "object",
      "properties": {
        "ExpirationDays": {
          "type": "integer",
          "description": "The period in days after which the system automatically deletes a channel."
        },
        "ExpirationCriterion": {
          "type": "string",
          "enum": [
            "CREATED_TIMESTAMP",
            "LAST_MESSAGE_TIMESTAMP"
          ],
          "description": "The conditions that must be met for a channel to expire."
        }
      },
      "required": [
        "ExpirationDays",
        "ExpirationCriterion"
      ]
    },
    "MessagingChimeTag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key in a tag."
        },
        "Value": {
          "type": "string",
          "description": "The value in a tag."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}