v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1494674591.3 KB

Uploads an attachment file to the specified Amazon Q in Connect message template. The name of the message template attachment has to be unique for each message template referenced by the <code>$LATEST</code> qualifier. The body of the attachment file should be encoded using base64 encoding. After the file is uploaded, you can use the pre-signed Amazon S3 URL returned in response to download the uploaded file.

post/knowledgeBases/{knowledgeBaseId}/messageTemplates/{messageTemplateId}/attachments

Path parameters

knowledgeBaseIdstring required

The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

messageTemplateIdstring required

The identifier of the message template. Can be either the ID or the ARN. It cannot contain any qualifier.

Request body

contentDisposition'ATTACHMENT' required

The presentation information for the attachment file.

namestring password required

The name of the attachment file being uploaded. The name should include the file extension.

bodystring password required

The body of the attachment file being uploaded. It should be encoded using base64 encoding.

clientTokenstring

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="http://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.

Response

Success