{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-search-message-templates-response-schema.json",
  "title": "SearchMessageTemplatesResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-search-api-openapi.yml#/components/schemas/SearchMessageTemplatesResponse",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MessageTemplateSearchResultData"
      },
      "description": "The results of the message template search."
    },
    "nextToken": {
      "type": "string",
      "description": "If there are additional results, this is the token for the next set of results."
    }
  },
  "required": [
    "results"
  ],
  "$defs": {
    "GroupingConfiguration": {
      "type": "object",
      "properties": {
        "criteria": {
          "type": "string",
          "description": "The criteria used for grouping Amazon Q in Connect users. The following is the list of supported criteria values. RoutingProfileArn: Grouping the users by their Amazon Connect routing profile ARN. User should have SearchRoutingProfile and DescribeRoutingProfile permissions when setting criteria to this value."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of values that define different groups of Amazon Q in Connect users. When setting criteria to RoutingProfileArn, you need to provide a list of ARNs of Connect Customer routing profiles as values of this parameter."
        }
      }
    },
    "MessageTemplateSearchResultData": {
      "type": "object",
      "properties": {
        "messageTemplateArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the message template."
        },
        "messageTemplateId": {
          "type": "string",
          "description": "The identifier of the message template."
        },
        "knowledgeBaseArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the knowledge base."
        },
        "knowledgeBaseId": {
          "type": "string",
          "description": "The identifier of the knowledge base."
        },
        "name": {
          "type": "string",
          "description": "The name of the message template."
        },
        "channel": {
          "type": "string",
          "description": "The channel of the message template."
        },
        "channelSubtype": {
          "type": "string",
          "description": "The channel subtype this message template applies to."
        },
        "createdTime": {
          "type": "string",
          "description": "The timestamp when the message template was created."
        },
        "lastModifiedTime": {
          "type": "string",
          "description": "The timestamp when the message template data was last modified."
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the user who last updated the message template data."
        },
        "isActive": {
          "type": "boolean",
          "description": "Whether the version of the message template is activated."
        },
        "versionNumber": {
          "type": "integer",
          "description": "The version number of the message template version."
        },
        "description": {
          "type": "string",
          "description": "The description of the message template."
        },
        "sourceConfigurationSummary": {
          "$ref": "#/$defs/MessageTemplateSourceConfigurationSummary"
        },
        "groupingConfiguration": {
          "$ref": "#/$defs/GroupingConfiguration"
        },
        "language": {
          "type": "string",
          "description": "The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW"
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags used to organize, track, or control access for this resource."
        }
      },
      "required": [
        "messageTemplateArn",
        "messageTemplateId",
        "knowledgeBaseArn",
        "knowledgeBaseId",
        "name",
        "channelSubtype",
        "createdTime",
        "lastModifiedTime",
        "lastModifiedBy"
      ]
    },
    "MessageTemplateSourceConfigurationSummary": {
      "type": "object",
      "properties": {
        "whatsApp": {
          "$ref": "#/$defs/WhatsAppMessageTemplateSourceConfigurationSummary"
        }
      },
      "description": "Exactly one member is set."
    },
    "WhatsAppMessageTemplateSourceConfigurationSummary": {
      "type": "object",
      "properties": {
        "businessAccountId": {
          "type": "string",
          "description": "The ID of the End User Messaging WhatsApp Business Account to associate with this template."
        },
        "templateId": {
          "type": "string",
          "description": "The ID of WhatsApp template."
        },
        "name": {
          "type": "string",
          "description": "The name of the WhatsApp template."
        },
        "language": {
          "type": "string",
          "description": "The language of the WhatsApp template."
        },
        "components": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of component mapping from WhatsApp template parameters to Message Template attributes."
        },
        "status": {
          "type": "string",
          "description": "The status of the message template."
        },
        "statusReason": {
          "type": "string",
          "description": "The status reason of the message template."
        }
      },
      "required": [
        "businessAccountId",
        "templateId"
      ]
    }
  }
}