EmailController

Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string.

Returns attachment bytes by attachment ID. Use attachment IDs from email payloads or attachment listing endpoints.

get/emails/{emailId}/attachments/{attachmentId}

Request

  • Base URL: https://api.mailslurp.com
  • URL: https://api.mailslurp.com/emails/{emailId}/attachments/{attachmentId}
  • Auth: API key in header x-api-key

Path parameters

emailIdstring uuid required

ID of email

attachmentIdstring required

ID of attachment

Query parameters

apiKeystring

Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly.

Response

default response

Changes

No recorded changes to this operation across all 1 revision of this API.