this was originally filed as a bmo bug, moved upstream, fixed upstream but not on bmo:
As discussed on IRC, attachments that are created using the REST API must always have their data base64 encoded, even if the data is marked as content_type plain/text.
The documentation wrongly specifies that the data can either be base64 or string instead.
Yep. Thanks for the reminder. Done.
1912ffe..4d112f8 master -> master