# How to POST request with video?

**URL:** <https://community.hubspot.com/t/how-to-post-request-with-video/18360>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [January 27, 2020, 9:56am UTC](https://community.hubspot.com/t/how-to-post-request-with-video/18360 "2020-01-27T09:56:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suonpera](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/suonpera/32/93635_2.png) [@Suonpera](https://community.hubspot.com/u/Suonpera)\
**Post date:** [January 27, 2020, 9:56am UTC](https://community.hubspot.com/t/how-to-post-request-with-video/18360/1 "2020-01-27T09:56:01Z")

</div>

I have a table in which there is a video column. In the [documentation](https://developers.hubspot.com/docs/methods/hubdb/hubdb_overview?_ga=2.182321959.1844795869.1579511583-378632627.1567169469) it doesn’t explain how to POST a new record including a video. Can someone explain how please?

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [January 27, 2020, 7:42pm UTC](https://community.hubspot.com/t/how-to-post-request-with-video/18360/2 "2020-01-27T19:42:14Z")

</div>

Welcome, @Suonpera.

When you [upload the video file](https://developers.hubspot.com/docs/methods/files/post_files) to your account’s file manager, the API will respond with the file’s `id`.

You can then use this `id` _as an integer_ when updating a HubDB row.

Here’s an example payload. Column `3` has the`"type": "VIDEO"`.

```auto
{
 "values": {
 "2": "My First Video",
 "13": 6783618473
 }
}

```

---

<div class="post-metadata">

**Author:** ![Suonpera](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/suonpera/32/93635_2.png) [@Suonpera](https://community.hubspot.com/u/Suonpera)\
**Post date:** [January 28, 2020, 8:40am UTC](https://community.hubspot.com/t/how-to-post-request-with-video/18360/3 "2020-01-28T08:40:38Z")

</div>

The API is now accepting my POST request using the file id. However, the video still isn’t being uploaded to the HubDB. A loading icon is displayed. My first thought was that it can take a while to upload the video, but I am trying with a video that is only 11 sec long and I have been waiting for 10 minutes.

This is in the body of the request:

```auto
{
	"values": 
		{
			"6": "Test title",
			"7": "Duration",
			"10":[ {
			 "id": 24402073174,
			 "name": 169554,
			 "type": "foreignId"
			}],
			"11": 24406370439
		}
}

```

column 11 is the video column

---

<div class="post-metadata">

**Author:** ![Suonpera](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/suonpera/32/93635_2.png) [@Suonpera](https://community.hubspot.com/u/Suonpera)\
**Post date:** [January 28, 2020, 9:35am UTC](https://community.hubspot.com/t/how-to-post-request-with-video/18360/4 "2020-01-28T09:35:09Z")

</div>

UPDATE

I was using the file id that I found in the file details of the video. However, this is apparently incorrect, which is why it was not working. Why is that not the correct id? I can only get the correct Id, if I inspect the ‘upload video to files’ request.

---

<div class="post-metadata">

**Author:** ![Suonpera](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/suonpera/32/93635_2.png) [@Suonpera](https://community.hubspot.com/u/Suonpera)\
**Post date:** [January 29, 2020, 7:44am UTC](https://community.hubspot.com/t/how-to-post-request-with-video/18360/5 "2020-01-29T07:44:34Z")

</div>

Hey Isaac. This didn’t solve my solution. I am able to upload yes, but why is the file ID wrong, when I find the video in the file archive? My Team (not developers) need an easy way to get the ID of the uploaded video.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [January 29, 2020, 11:09pm UTC](https://community.hubspot.com/t/how-to-post-request-with-video/18360/6 "2020-01-29T23:09:55Z")

</div>

Hi, @Suonpera.

Apologies for the delayed response.

To confirm, are you using a [HubL video player module](https://designers.hubspot.com/docs/hubl/hubl-supported-tags#video-player)?

The HubL statement takes a `player_id` which, per [this documentation](https://designers.hubspot.com/docs/hubl/hubl-supported-tags#video-player), _can_ be retrieved with a `GET` to [`/filemanager/api/v2/files/:file_id`](https://developers.hubspot.com/docs/methods/files/get_files_file_id) in the `meta.video_data.hosting_infos` dictionary, but I have been able to get it to work with the file ID alone.

If neither of these IDs are working for you, could you share a link to the page where you are trying to get these videos to display? Feel free to share it with me via direct message.

---

<div class="post-metadata">

**Author:** ![Suonpera](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/suonpera/32/93635_2.png) [@Suonpera](https://community.hubspot.com/u/Suonpera)\
**Post date:** [January 30, 2020, 8:11am UTC](https://community.hubspot.com/t/how-to-post-request-with-video/18360/7 "2020-01-30T08:11:53Z")

</div>

Actually I wasn’t aware that I needed to use file id to fetch another id. I though I could use the file Id. Well that sorts everything out. Thanks for your help!

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [January 30, 2020, 12:00pm UTC](https://community.hubspot.com/t/how-to-post-request-with-video/18360/8 "2020-01-30T12:00:10Z")

</div>

Hi, @Suonpera.

Actually I was trying to say that the file ID alone _did_ work for me!

Either way, it sounds like you found a solution, though, so I’m glad.
