# How to upload multiple files at the same time via api

**URL:** <https://community.hubspot.com/t/how-to-upload-multiple-files-at-the-same-time-via-api/41406>\
**Category:** Tips, Tricks & Best Practices\
**Tags:** forms\
**Created:** [July 28, 2021, 10:17am UTC](https://community.hubspot.com/t/how-to-upload-multiple-files-at-the-same-time-via-api/41406 "2021-07-28T10:17:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tme](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tme/32/27089_2.png) [@tme](https://community.hubspot.com/u/tme)\
**Post date:** [July 28, 2021, 10:17am UTC](https://community.hubspot.com/t/how-to-upload-multiple-files-at-the-same-time-via-api/41406/1 "2021-07-28T10:17:14Z")

</div>

We can upload file ([https://legacydocs.hubspot.com/docs/methods/files/v3/upload\_new\_file](https://legacydocs.hubspot.com/docs/methods/files/v3/upload_new_file)) mentioned in the article, but if I have multiple files, I have to call the api request n number of time ( n = no. of files). I’m looking for a quick way, where I can achieve this in single api call.

---

<div class="post-metadata">

**Author:** ![PamCotton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pamcotton/32/47916_2.png) [@PamCotton](https://community.hubspot.com/u/PamCotton)\
**Post date:** [July 28, 2021, 9:47pm UTC](https://community.hubspot.com/t/how-to-upload-multiple-files-at-the-same-time-via-api/41406/2 "2021-07-28T21:47:43Z")

</div>

Hello @tme, I was able to investigate more about it and when looking to pass multi-files you are able to use the _HubSpot Form APIs_, you would need to send the same field for each file, example:

```auto
var data ={
 "fields":[
 {
 "name":"email",
 "value":"getEmail"
 },
 {
 "name":"filemulti",
 "value":"https://file-url.jpg"
 },
 {
 "name":"filemulti",
 "value":"https://file-url2.jpg"
 ]
 }

```

Let me know if this works for you!

Kindly,

Pam

---

<div class="post-metadata">

**Author:** ![tme](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tme/32/27089_2.png) [@tme](https://community.hubspot.com/u/tme)\
**Post date:** [July 29, 2021, 12:09pm UTC](https://community.hubspot.com/t/how-to-upload-multiple-files-at-the-same-time-via-api/41406/3 "2021-07-29T12:09:02Z")

</div>

Hey @PamCotton, thanks for the reply

We want to get different files from the user like their resume, profile pic, and introductory video. Internally, Hubspot uses this API endpoint ‘[https://forms.hsforms.com/submissions/v3/public/submit/formsnext/multipart/:portalID/:formGuid](https://forms.hsforms.com/submissions/v3/public/submit/formsnext/multipart/:portalID/:formGuid)’,

where we can submit different files at the same time, and don’t have to worry about uploading the files.

What we’re trying to do is, instead of using HubSpot form, we want to use our custom form for a better user experience, and submit the form data using API (the file will be in binary format). Right now we are trying to use this API endpoint

['https://api.hsforms.com/submissions/v3/integration/submit/](https://api.hsforms.com/submissions/v3/integration/submit/)[:portalID/:](https://forms.hsforms.com/submissions/v3/public/submit/formsnext/multipart/:portalID/:)formGuid’, but its content-type is application/json and we can’t send a binary string (file data) to it, based on your solution we have to upload these files somewhere (like Hubspot), and then provide the URL of that file, which is working. But we want to implement it as you do it using your internal API endpoint. is it possible? do you have any public API endpoint like it? if No, is this is the only way to do it (first upload files on Hubspot using file upload API and submit the form by providing that URL)?

---

<div class="post-metadata">

**Author:** ![PTewani](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@PTewani](https://community.hubspot.com/u/PTewani)\
**Post date:** [December 1, 2023, 1:48pm UTC](https://community.hubspot.com/t/how-to-upload-multiple-files-at-the-same-time-via-api/41406/4 "2023-12-01T13:48:44Z")

</div>

Facing the same issue, Can hubspot team look in to this ? Many peoples are facing this issue

---

<div class="post-metadata">

**Author:** ![PTewani](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@PTewani](https://community.hubspot.com/u/PTewani)\
**Post date:** [December 1, 2023, 1:49pm UTC](https://community.hubspot.com/t/how-to-upload-multiple-files-at-the-same-time-via-api/41406/5 "2023-12-01T13:49:22Z")

</div>

That didn;t worked for me. it overwrote the previous one with the newest one.
