Menu
AWS Support
API Reference (API Version 2013-04-15)

AddAttachmentsToSet

Adds one or more attachments to an attachment set. If an attachmentSetId is not specified, a new attachment set is created, and the ID of the set is returned in the response. If an attachmentSetId is specified, the attachments are added to the specified set, if it exists.

An attachment set is a temporary container for attachments that are to be added to a case or case communication. The set is available for one hour after it is created; the expiryTime returned in the response indicates when the set expires. The maximum number of attachments in a set is 3, and the maximum size of any attachment in the set is 5 MB.

Request Syntax

{
   "attachments": [ 
      { 
         "data": blob,
         "fileName": "string"
      }
   ],
   "attachmentSetId": "string"
}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

attachments

One or more attachments to add to the set. The limit is 3 attachments per set, and the size limit is 5 MB per attachment.

Type: Array of Attachment objects

attachmentSetId

The ID of the attachment set. If an attachmentSetId is not specified, a new attachment set is created, and the ID of the set is returned in the response. If an attachmentSetId is specified, the attachments are added to the specified set, if it exists.

Type: String

Response Syntax

{
   "attachmentSetId": "string",
   "expiryTime": "string"
}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

attachmentSetId

The ID of the attachment set. If an attachmentSetId was not specified, a new attachment set is created, and the ID of the set is returned in the response. If an attachmentSetId was specified, the attachments are added to the specified set, if it exists.

Type: String

expiryTime

The time and date when the attachment set expires.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

AttachmentLimitExceeded

The limit for the number of attachment sets created in a short period of time has been exceeded.

HTTP Status Code: 400

AttachmentSetExpired

The expiration time of the attachment set has passed. The set expires 1 hour after it is created.

HTTP Status Code: 400

AttachmentSetIdNotFound

An attachment set with the specified ID could not be found.

HTTP Status Code: 400

AttachmentSetSizeLimitExceeded

A limit for the size of an attachment set has been exceeded. The limits are 3 attachments and 5 MB per attachment.

HTTP Status Code: 400

InternalServerError

An internal server error occurred.

HTTP Status Code: 500

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: