Each endpoint accepts an
:as2_message_id path parameter indicating the source AS2 message.
For messages containing multiple attachments, an additional
:index path parameter can be provided
to specify which attachment to download.
The parameter is zero-based; e.g. for a message with 5 attachments, valid values for
:index would be 0 through 4.
:index is unspecified, only the first attachment (position 0) will be downloaded.
For all successful responses,
the response status will be
HTTP 200 OK
the response payload will be the binary data of the attachment, with
the attachment file name will be available in the
Content-Disposition: attachment; filename=<attachment_name>
GET /:v/message/received/:as2_message_id/attachments GET /:v/message/received/:as2_message_id/attachments/:index
GET /:v/message/sent/:as2_message_id/attachments GET /:v/message/sent/:as2_message_id/attachments/:index
Submit the message IDs whose attachments you want to download (up to 100), as a JSON array in the request body:
POST /:v/message/received/batch/attachments Authorization: <token_string> Content-Type: application/json ["message-id-1","message-id-2",...]
You can also pass in a
markAsRead query parameter
to automatically mark these messages as read, after downloading their attachments.
The response payload will be a zip archive (
containing attachments of each message under a folder named after the respective message ID:
<zip archive> | |__message-id-1/ | | | |__attachment-1-1 | |__attachment-1-2 | |__message-id-2/ | | | |__attachment-2-1 | |__attachment-2-2 ...
If the API failed to find attachments for any provided message ID,
the corresponding folder inside the archive will contain a
If the total size of aggregated attachments exceeds 10 MB, the API will stop the aggregation,
and return the set of attachments aggregated so far, as the zip content.
In this case, the response HTTP code will be 206 Partial Content (instead of the usual 200),
and the zero-based index of the last successfully added attachment will be indicated
Also in this case, if
Endpoint specification is the same as attachment download.