Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.leadwaycrm.com/llms.txt

Use this file to discover all available pages before exploring further.

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
POST https://services.leadconnectorhq.com/conversations/messages/upload

Autorizacion

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticacion.
Version
string
default:"2021-07-28"
required
Version de la API.

Body

conversationId
string
default:"ve9EPM428h8vShlRW1KT"
required
Conversation Id
contactId
string
default:"ve9EPM428h8vShlRW1KT"
required
Contact Id
locationId
string
required
attachmentUrls
string[]
required
chatServiceSid
string
default:"ISxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Twilio chat service SID for group SMS uploads
isGroupSms
string
default:"true"
Flag to indicate group SMS upload flow. When true, only 1 file upload is allowed per request.

Respuestas

uploadedFiles
object
required
twilioMediaSids
string[]
Twilio media SIDs for group SMS (when isGroupSms=true)
{
  "uploadedFiles": {},
  "twilioMediaSids": [
    "MExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  ]
}
{}
{}
status
number
default:"413"
required
HTTP Status code of the request Posibles valores: 400, 413, 415
message
string
default:"Failed to upload the files"
required
Error message of the request
{
  "status": 413,
  "message": "Failed to upload the files"
}
status
number
default:"413"
required
HTTP Status code of the request Posibles valores: 400, 413, 415
message
string
default:"Failed to upload the files"
required
Error message of the request
{
  "status": 413,
  "message": "Failed to upload the files"
}

Ejemplo

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"
}'