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.

Generates a signed URL for direct file upload to Google Cloud Storage. Returns a signed URL valid for 15 minutes. Upload file via PUT request, then call /complete to finalize.
POST https://services.leadconnectorhq.com/conversations/messages/upload/initiate

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

locationId
string
default:"ve9EPM428h8vShlRW1KT"
required
Account ID
conversationId
string
default:"ve9EPM428h8vShlRW1KT"
required
Conversation ID
filename
string
default:"video.mp4"
required
Original filename with extension
contentType
string
default:"video/mp4"
required
MIME type of the file
fileSize
number
default:"52428800"
File size in bytes (optional, for pre-validation)
channel
string
default:"WHATSAPP"
required
Channel type for size limits (WHATSAPP for 100MB limit, others for 5MB)

Respuestas

uploadUrl
string
required
Signed URL for direct upload to GCS. Use PUT request with file content.
uploadId
string
default:"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
required
Unique upload ID for tracking and completing the upload
filePath
string
default:"account/loc123/conversations/conv456/uuid.mp4"
required
File path in GCS bucket (needed for confirmation endpoint)
expiresAt
number
default:"1701619200000"
required
URL expiration timestamp (Unix milliseconds)
maxFileSize
number
default:"104857600"
required
Maximum allowed file size in bytes
{
  "uploadUrl": "https://storage.googleapis.com/bucket/path?X-Goog-Algorithm=...",
  "uploadId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "filePath": "account/loc123/conversations/conv456/uuid.mp4",
  "expiresAt": 1701619200000,
  "maxFileSize": 104857600
}
{}

Ejemplo

curl -X POST 'https://services.leadconnectorhq.com/conversations/messages/upload/initiate' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "locationId": "ve9EPM428h8vShlRW1KT",
  "conversationId": "ve9EPM428h8vShlRW1KT",
  "filename": "video.mp4",
  "contentType": "video/mp4",
  "fileSize": 52428800,
  "channel": "WHATSAPP"
}'