Rest/API for File upload

Hello Issac,

Thank you for your reply, I tried to write a simillar code in Java, I received an error:

“415 Unsupported Media Type HTTP/1.1”, I did set the value:

Content-type: “Application-Json” in the header.

Following is the Java code:

HttpPost post = new HttpPost(“http://api.hubapi.com/filemanager/api/v2/files?hapikey=<value>”);
JSONObject params = new JSONObject();
params.put(“files”, “<value>”);
StringEntity stringEntity = new StringEntity(params.toString());
post.addHeader(“Content-Type”,“application/json”);
post.setEntity(new StringEntity(params.toString(), StandardCharsets.UTF_8));
HttpClient httpclient = HttpClients.createDefault();
HttpResponse response = httpclient.execute(post);

Any idea?

Regards,

Yoram