Post the necessary fields for the API to upload files. The files need to be a buffer with the key "fileAttachment". <br /><br /> The allowed file types are: <br/> <ul><li>JPG</li><li>JPEG</li><li>PNG</li><li>MP4</li><li>MPEG</li><li>ZIP</li><li>RAR</li><li>PDF</li><li>DOC</li><li>DOCX</li><li>TXT</li><li>MP3</li><li>WAV</li></ul> <br /><br /> The API will return an object with the URLs

http
POST https://services.leadconnectorhq.com/conversations/messages/upload

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Body

NameTypeRequiredExampleDescription
conversationIdstringYesve9EPM428h8vShlRW1KTConversation Id
contactIdstringYesve9EPM428h8vShlRW1KTContact Id
locationIdstringYes
attachmentUrlsstring[]Yes
chatServiceSidstringNoISxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxTwilio chat service SID for group SMS uploads
isGroupSmsstringNotrueFlag to indicate group SMS upload flow. When true, only 1 file upload is allowed per request.

Responses

200 - Uploaded the file successfully
  • uploadedFiles (object, required)

  • twilioMediaSids (string[]): Twilio media SIDs for group SMS (when isGroupSms=true)

json
{
  "uploadedFiles": {},
  "twilioMediaSids": [
    "MExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  ]
}
400 - Bad Request
json
{}
401 - Unauthorized
json
{}
413 - Payload Too Large
  • status (number, required): HTTP Status code of the request Possible values: 400, 413, 415 Example: 413

  • message (string, required): Error message of the request Example: Failed to upload the files

json
{
  "status": 413,
  "message": "Failed to upload the files"
}
415 - Unsupported Media Type
  • status (number, required): HTTP Status code of the request Possible values: 400, 413, 415 Example: 413

  • message (string, required): Error message of the request Example: Failed to upload the files

json
{
  "status": 413,
  "message": "Failed to upload the files"
}

Example

curl -X POST 'https://services.leadconnectorhq.com/conversations/messages/upload' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "conversationId": "ve9EPM428h8vShlRW1KT",
  "contactId": "ve9EPM428h8vShlRW1KT",
  "locationId": "string",
  "attachmentUrls": [
    "string"
  ],
  "chatServiceSid": "ISxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "isGroupSms": "true"
}'

Last updated October 26, 2026

Was this page helpful?