Upload an attachment to R2 storage (tiered auth)
Messages
Upload an attachment to R2 storage (tiered auth)
Upload a single message attachment to R2 storage. Accepts authenticated agent uploads or unauthenticated webchat uploads gated by a valid webchatConfigId. Returns the storage key plus content metadata for inclusion in a subsequent send-message call.
POST
Upload an attachment to R2 storage (tiered auth)
Body
multipart/form-data
Multipart form. Send the file as a file part; for unauthenticated webchat uploads also include webchatConfigId. Example with curl: curl -F "file=@receipt.png" -H "Authorization: Bearer $TOKEN" /api/messages/upload-attachment.