Skip to main content
Post the necessary fields for the API to upload files. The files need to be a buffer with the key ”< custom_field_id >_< file_id >”. <br /> Here custom field id is the ID of your custom field and file id is a randomly generated id (or uuid) <br /> There is support for multiple file uploads as well. Have multiple fields in the format mentioned.<br />File size is limited to 50 MB.<br /><br /> The allowed file types are: <br/> <ul><li>PDF</li><li>DOCX</li><li>DOC</li><li>JPG</li><li>JPEG</li><li>PNG</li><li>GIF</li><li>CSV</li><li>XLSX</li><li>XLS</li><li>MP4</li><li>MPEG</li><li>ZIP</li><li>RAR</li><li>TXT</li><li>SVG</li></ul> <br /><br /> The API will return the updated contact object.
POST https://services.leadconnectorhq.com/forms/upload-custom-files

Autorización

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

Query parameters

contactId
string
default:"dtEv6KtI27yF92YPm3Zz"
required
Contact ID to upload the file to.
locationId
string
default:"quXmPY59n1zgGBabY1bZ"
required
Account ID of the contact.

Respuestas

{}
{}

Ejemplo

curl -X POST 'https://services.leadconnectorhq.com/forms/upload-custom-files' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/forms/upload-custom-files', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
    Version: '2021-07-28',
  },
});
const data = await response.json();
import os, requests
response = requests.request(
    'POST',
    'https://services.leadconnectorhq.com/forms/upload-custom-files',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
    },
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/forms/upload-custom-files');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
        'Version: 2021-07-28',
    ],
]);
$data = json_decode(curl_exec($ch), true);