# form submit API v3 not responding to POST request

**URL:** <https://community.hubspot.com/t/form-submit-api-v3-not-responding-to-post-request/35473>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, forms\
**Created:** [April 14, 2021, 12:34am UTC](https://community.hubspot.com/t/form-submit-api-v3-not-responding-to-post-request/35473 "2021-04-14T00:34:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![znwhite](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/znwhite/32/91658_2.png) [@znwhite](https://community.hubspot.com/u/znwhite)\
**Post date:** [April 14, 2021, 12:34am UTC](https://community.hubspot.com/t/form-submit-api-v3-not-responding-to-post-request/35473/1 "2021-04-14T00:34:07Z")

</div>

I’m in a React/Next.js project and trying to test the v3 form submit API endpoint.

I’m using the axios package to send the POST request, here is my code:

```lia-code-sample
import axios from 'axios';

export const submit_hs_form = async () => {
 const portalId = 'my_portal_id';
 const formGuid = 'my_form_guid';
 const res = await axios.post(
 `https://api.hsforms.com/submissions/v3/integration/submit/${portalId}/${formGuid}`,
 {
 portalId,
 formGuid,
 fields: [
 {
 name: 'email',
 value: 'sdfsfd33@gmail.com',
 },
 ],
 }
 );
 return res;
};

```

Every time I call the function, I get no response. The request hangs for over 10 seconds and then nothing happens, and I don’t see anything new submissions in my forms dashboard in HubSpot.

Anybody have any idea why this might be happening?

This is just a regular function I am calling from my frontend.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [April 14, 2021, 3:38pm UTC](https://community.hubspot.com/t/form-submit-api-v3-not-responding-to-post-request/35473/2 "2021-04-14T15:38:42Z")

</div>

hi @znwhite

Might need a bit more info to solve.

Are you getting an error at all?

Are your headers set to submit json?

@tjoyce can probably help here

---

<div class="post-metadata">

**Author:** ![znwhite](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/znwhite/32/91658_2.png) [@znwhite](https://community.hubspot.com/u/znwhite)\
**Post date:** [April 14, 2021, 11:45pm UTC](https://community.hubspot.com/t/form-submit-api-v3-not-responding-to-post-request/35473/3 "2021-04-14T23:45:18Z")

</div>

Thanks @dennisedson. I added “Content-Type”: “application/json” to the header of the request and it appears to work.

For anyone interested, I actually ended up writing a blog post showing you how to do it: [https://www.devtwins.com/blog/hubspot-forms-react-submit-form-using-hubspot-api](https://www.devtwins.com/blog/hubspot-forms-react-submit-form-using-hubspot-api)

Thanks again.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [April 15, 2021, 12:10am UTC](https://community.hubspot.com/t/form-submit-api-v3-not-responding-to-post-request/35473/4 "2021-04-15T00:10:15Z")

</div>

Amazing and so great that you added an example!
