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.

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

Authorization

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

Body

NameTypeRequiredExampleDescription
locationIdstringYesve9EPM428h8vShlRW1KTAccount ID
conversationIdstringYesve9EPM428h8vShlRW1KTConversation ID
filenamestringYesvideo.mp4Original filename with extension
contentTypestringYesvideo/mp4MIME type of the file
fileSizenumberNo52428800File size in bytes (optional, for pre-validation)
channelstringYesWHATSAPPChannel type for size limits (WHATSAPP for 100MB limit, others for 5MB)

Responses

200 - Signed URL generated successfully
  • uploadUrl (string, required): Signed URL for direct upload to GCS. Use PUT request with file content. Example: https://storage.googleapis.com/bucket/path?X-Goog-Algorithm=...

  • uploadId (string, required): Unique upload ID for tracking and completing the upload Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890

  • filePath (string, required): File path in GCS bucket (needed for confirmation endpoint) Example: account/loc123/conversations/conv456/uuid.mp4

  • expiresAt (number, required): URL expiration timestamp (Unix milliseconds) Example: 1701619200000

  • maxFileSize (number, required): Maximum allowed file size in bytes Example: 104857600

json
{
  "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
}
400 - Bad Request - Invalid parameters
401 - Unauthorized
json
{}
413 - File size exceeds maximum allowed limit

Example

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

Last updated October 26, 2026

Was this page helpful?