Skip to main content
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.

file
file
required

A single binary attachment (image, video, PDF). Max 50 MB.

webchatConfigId
string

Required when the caller is the webchat widget (no JWT/API-key). Validated against the org's active webchat configurations to gate unauthenticated uploads.

Response

Attachment uploaded

success
boolean
attachment
object