Rest/API for File upload

Hi, @yorambaron.

The CMS Files API, which this endpoint is part of, is a REST API. Are you referring to a JavaScript example?

If so, something like this just worked for me:

var data = new FormData();
data.append("files", "/Users/my/file/location.jpg");
data.append("file_names", "My File Name");

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.open("POST", "https://api.hubapi.com/filemanager/api/v2/files?hapikey=my_key");
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.send(data);

Please let me know if I’ve misunderstood your request.