Sending attachments isn’t horrible, but it’s not fun either here’s how I do it:
This is my JSON body in my call:
{
"From" : "<From>",
"To" : "<To>",
"Subject" : "<Subject>",
"Tag": "<Tag>",
"MessageStream": "<Message Stream>",
"HtmlBody" : <HtmlBody>,
"Attachments": [
{
"Name": "<Attachment Name>",
"Content": "<Attachment Content>",
"ContentType": "<Attachment Type>"
}
]
}
Under the attachment array, for Name that’s just the name of the file, for Content Postmark takes it in base64 form (see screenshot below for how I accomplished that), and ContentType is the file type for example PDF is application/pdf
Note: the field you’re referencing should be a file type