Skip to main content
POST
/
api
/
messages
/
upload-attachment
Upload an attachment to R2 storage (tiered auth)
curl --request POST \
  --url https://your-instance.example.com/api/messages/upload-attachment \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file' \
  --form 'webchatConfigId=<string>'
{
  "success": true,
  "attachment": {
    "storageKey": "<string>",
    "filename": "<string>",
    "contentType": "<string>",
    "size": 123
  }
}

Body

multipart/form-data
file
file
required
webchatConfigId
string

Response

Attachment uploaded

success
boolean
attachment
object