Open an upload for a file to send
create_attachment_uploadOpens an address to send a file to, so that a message can attach it without carrying it. Answers with an upload_id and an upload_url: PUT the bytes to that address in one request (no key, nothing to sign, for example curl -T report.pdf "<upload_url>"), then pass {"upload_id": "..."} in the "attachments" of send_email, reply_to_conversation, forward_conversation or approve_draft. This is the way to attach a real document: the inline base64 form asks you to write the whole file out yourself, which a PDF of a few pages overruns. One file per upload, good for one PUT, and it keeps for a day.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | The name the recipient will see, extension included. It is fixed here: the message that attaches the file does not rename it. | |
| content_type | No | The media type, for example "application/pdf". Left out, it is read from the bytes when they arrive. |