If hosted is set to true then fileUrl is required. Else file is required. If adding a file, maximum allowed is 25 MB

http
POST https://services.leadconnectorhq.com/medias/upload-file

Authorization

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

Body

NameTypeRequiredExampleDescription
filestringNo
hostedbooleanNo
fileUrlstringNo
namestringNo
parentIdstringNo

Responses

200 - Successful response
  • fileId (string, required): ID of the uploaded file Example: file.pdf

  • url (string, required): Google Cloud Storage URL of the uploaded file Example: https://storage.googleapis.com/bucket-name/path/to/file.pdf

json
{
  "fileId": "file.pdf",
  "url": "https://storage.googleapis.com/bucket-name/path/to/file.pdf"
}

Example

curl -X POST 'https://services.leadconnectorhq.com/medias/upload-file' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "file": "string",
  "hosted": true,
  "fileUrl": "string",
  "name": "string",
  "parentId": "string"
}'

Last updated October 26, 2026

Was this page helpful?