mailpit unofficial
GET/api/v1/message/{ID}/part/{PartID}

Get message attachment

This will return the attachment part using the appropriate Content-Type.

The ID can be set to latest to reference the latest message.

2 parameters
IDstringrequired
Message database ID or "latest"
PartIDstringrequired
Attachment part ID

3 status codes
200Binary data response which inherits the attachment's content type.
400Server error will return with a 400 status code with the error message in the body
404Not found error will return a 404 status code

Error handling

A 400 is returned: Server error will return with a 400 status code with the error message in the body. A 404 is returned: Not found error will return a 404 status code.