Overview
Uploads a file for a draft one-off email thread. The endpoint stores the file in private Supabase storage and returns attachment metadata that can be saved on the draft or sent with Send message. Uploads are only allowed for email threads that are still drafts or still have draft email fields. Maximum file size is 10 MB.Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Draft email thread ID. |
Request Body
Sendmultipart/form-data with one field:
| Field | Type | Description |
|---|---|---|
file | file | Attachment file, max 10 MB. |
Example
url is a signed preview URL. Store and send the durable bucket and path fields; Puffle refreshes signed URLs when returning thread and message data.
Error Notes
| Status | When it happens |
|---|---|
400 | Missing file, file over 10 MB, or thread is not draft-editable. |
404 | The thread is missing, belongs to another workspace, or is not an email thread. |
500 | Storage bucket or upload failure. |
AI agent notes
Upload attachments before sending. Include returned attachment metadata indraft_attachments when saving the draft or in attachments when calling Send message.