Is it possible to upload files via the API? Attach files when sending invoice emails?

Hi,

Is is possible to upload files programatically then associate a file when
sending an invoice email?

Otherwise, how about just uploading / attaching a file when sending an
invoice email (ie, the POST to invoices/:id/send_email

Cheers ears,
Toby