Download Attachment
Download an attachment's bytes.
Download an attachment's bytes.
Scope: email_testing.messages.read
Path Parameters
idstringrequiredThe ID of the captured message, for example d5949378-3069-4d8f-a8f3-6e5edf5d6060. You get it from List Messages or the message.received webhook. It isn't the email's Message-ID header.
attachment_idstringrequiredThe ID of the attachment, taken from List Attachments.
Sample Request
Request
curl "https://api.maileroo.com/v1/email-testing/messages/d5949378-3069-4d8f-a8f3-6e5edf5d6060/attachments/5b39a483-7989-4882-b663-f88b1db2407a/download" \
-H "Authorization: Bearer roo_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Sample Response
The response body contains the attachment's raw bytes, not a JSON envelope. Content-Type uses the attachment's safe media type, and the response uses an attachment content disposition with the attachment filename.
Response headers
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="invoice.pdf"Errors
404 Not Found— the resource does not exist or is not owned by the account.