Sites & Content
funnels, forms & media api
If hosted is set to true then fileUrl is required. Else file is required. If adding a file, maximum allowed is 25 MB. For video files, the maximum allowed size is 500 MB.
cURL
curl --request POST \ --url https://services.leadconnectorhq.com/medias/upload-file \ --header 'Authorization: <authorization>' \ --header 'Content-Type: multipart/form-data' \ --form file='@example-file' \ --form hosted=true \ --form 'fileUrl=<string>' \ --form 'name=<string>'
{ "fileId": "file.pdf", "url": "https://storage.googleapis.com/bucket-name/path/to/file.pdf" }
Access Token
"Bearer 9c48df2694a849b6089f9d0d3513efe"
Successful response
ID of the uploaded file
"file.pdf"
Google Cloud Storage URL of the uploaded file
"https://storage.googleapis.com/bucket-name/path/to/file.pdf"
Was this page helpful?