Skip to main content

List attachments for a specific email

caution

This endpoint is accessible only for paid plans.

How to use

  • Method: GET
  • Path: /attachments
  • Query parameters:
    • key: the key (email/id) to list attachments for
  • Response:
    • 200: an array of attachments
    • 400: the key is not valid or
    • 500: an error occurred
note

The key is the combination of the email address and the email id. It can be found in the main api endpoint result.

note

Each attachment can be downloaded by using the url property. A presigned URL is used to allow the download without authentication for the next 15 minutes.

Example


curl "https://api.testsendr.link/attachments?key=foo@testsendr.link/db08khkkv5a8a5fevq90b9tkhhmteqogsm21ea81"

Response:

[
{
"contentDisposition": "inline",
"contentType": "application/pdf",
"filename": "InvoiceSimple-PDF-Template.pdf",
"size": 62037,
"url": "https://prod-testsendr-main-emailstoragebucket03c5b3b9-1fc5ioga3iimc.s3.us-west-2.amazonaws.com/foo%40testsendr.link/db08khkkv5a8a5fevq90b9tkhhmteqogsm21ea81/0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=ASIARWJGBVJFX24VC25N%2F20230209%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230209T014745Z&X-Amz-Expires=900&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEPr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLXdlc3QtMiJHMEUCIQDLjSBad72x97DtnzqWPJbdKOqrGKi7vA39JjzfINm5PQIgLj%2Bm1TcqacJjWtQAUW9cKQUuG1VhjiSNUSG4p5br1WQq0AMIg%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAAGgwxMTY1ODA3ODg4MTEiDF0aloDmL1iO7TF57SqkA%2FdNl%2BsIIunqICaxz5aDAGvqLewWuKDQncxjKSl0mZdKgyX%2FIBTp0dCvXrEi4TKh0YeISyktCTjhKZ2hB0AVXsmN%2FuybIdK26w1Zyd4bpKbZVYqkTSE%2F3wtYVhwJIYjNLOd8ETJGzuGaDErGIicDfgmAIQsaRpYb0IKoi33%2BTxny0P8wZM8%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