messages:read scope.
Read attachment metadata
Attachment ids come from theattachments array on a fetched message. Fetch one to get its filename, content type, size, and the message it belongs to.
disposition is attachment for a normal file or inline for one referenced from the HTML body (an embedded image, say).
Get the file
Three endpoints serve the file, each for a different consumer:
On
/url and /link, expiryHours sets how long the links stay valid — an integer from 1 to 168 (one week). Omit it and the links last five minutes.
403.
Share a file by link
TheshareUrl is a human-friendly download page — handy when you want to hand a file to someone in an email. Dairo never inserts links into your mail for you: mint the link, then place it in your text or html deliberately.
Two things to keep in mind when sharing inbound files onward:
- A share link only starts serving an inbound file after it passes Dairo’s malware scan; until then the page withholds the download.
- Sharing a file onward means vouching for a file you didn’t author. The page is hosted by Dairo, but the file behind it is whatever the sender attached — confirm it’s safe before distributing the link.
Next steps
- Send an email — attach files to outbound mail.
- Share links — the same short-lived links over files in your own storage buckets.
- API reference — every endpoint, with copy-paste requests.