# Send external form data to hubspot

**URL:** <https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211>\
**Category:** Tips, Tricks & Best Practices\
**Created:** [November 14, 2019, 3:10pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211 "2019-11-14T15:10:59Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![btc2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/btc2/32/44503_2.png) [@btc2](https://community.hubspot.com/u/btc2)\
**Post date:** [November 14, 2019, 3:10pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/1 "2019-11-14T15:10:59Z")

</div>

I have a wordpress registration form and how can I send data from that form to hubspot, I need more explanatory information, someone who can help me.

query link

[https://developers.hubspot.com/docs/methods/forms/submit\_form](https://developers.hubspot.com/docs/methods/forms/submit_form)

---

<div class="post-metadata">

**Author:** ![jackcoldrick](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jackcoldrick/32/5119_2.png) [@jackcoldrick](https://community.hubspot.com/u/jackcoldrick)\
**Post date:** [November 15, 2019, 3:24pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/2 "2019-11-15T15:24:15Z")

</div>

Hi @btc2 ,

What difficulties are you currently facing? The documentation you linked is our forms API which is typically used to integrate an external form to HubSpot. It’s particularly useful if you want to have total control of the form look/feel and submission logic whilst ensuring the data captured is securely sent to HubSpot.

I’m happy to answer any specific questions you might have. Some other ideas might be to consider using an embedded hubspot form in place of the current form?

- Jack

---

<div class="post-metadata">

**Author:** ![btc2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/btc2/32/44503_2.png) [@btc2](https://community.hubspot.com/u/btc2)\
**Post date:** [November 15, 2019, 3:51pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/3 "2019-11-15T15:51:18Z")

</div>

I have a registration form for a community, but it is an external hubspot form, I integrate the API code in PHP language, with the portal and form data.

 ![Captura de pantalla (18).png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/f/f10e88c7d5c1a62eb35f49268d0564264c86d1fe.png)

---

<div class="post-metadata">

**Author:** ![jackcoldrick](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jackcoldrick/32/5119_2.png) [@jackcoldrick](https://community.hubspot.com/u/jackcoldrick)\
**Post date:** [November 15, 2019, 3:56pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/4 "2019-11-15T15:56:12Z")

</div>

Hi @btc2 ,

The issue is with the URL you are posting to. You currently have:

```lia-code-sample
/submissions/v2/post/upload/{portalId}/{formGuid}';

```

Whereas it should be:

`/submissions/v2/post/upload/portalId/formGuid';`

In otherwords you need to remove the “{” and “}” symbols. Can you try that and let me know.

Jack

---

<div class="post-metadata">

**Author:** ![btc2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/btc2/32/44503_2.png) [@btc2](https://community.hubspot.com/u/btc2)\
**Post date:** [November 15, 2019, 4:27pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/5 "2019-11-15T16:27:51Z")

</div>

connected successfully thanks, but send the form with empty fields to hubspot,

the fields in my web form are almost equal to the form I created in Hubspot, the difference is the password fields that are not included in the Hubspot form.

---

<div class="post-metadata">

**Author:** ![jackcoldrick](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jackcoldrick/32/5119_2.png) [@jackcoldrick](https://community.hubspot.com/u/jackcoldrick)\
**Post date:** [November 15, 2019, 4:36pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/6 "2019-11-15T16:36:13Z")

</div>

Thats good to hear @BT . One thing I would say is that you should not be storing password information in your HubSpot portal. For everything else you can include it in your POST request. Typically the process looks something like this:

I have a form with the following fields:

```auto
<form id="contact-form" method="post" action="submit.php">
  First Name:<input type="text" name="firstname">
  Last Name:<input type="text" name="lastname"> Email Address: <input type="text" name="email">
  Country:<input type="text" name="country">
  <input type="submit" value="Submit">
</form>

```

Then in my submit.php file I would have to get the data from the POST array:

```auto
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$email = $_POST['email'];
$country = $_POST['country'];

```

Then I would formulate my string of data I want to post like this:

```auto
$str_post = "firstname=" . urlencode($firstname) 
 . "&lastname=" . urlencode($lastname) 
 . "&email=" . urlencode($email) 
 . "&country=" . urlencode($country) 
 . "&hs_context=" . urlencode($hs_context_json); 

```

And make the POST request. The data should be updated accordingly. It’s important to note that the fields I include in the code above are the internal property values of the HubSpot properties I wish to update.

Also worth noting the “hs\_context” parameter is very important. That is used to pass meta data relating to the form submission into HubSpot. It can associate a contact record in HubSpot to the usertoken/cookie on the browser.

Let me know if this helps!

- Jack

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [February 28, 2024, 2:17pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/7 "2024-02-28T14:17:14Z")

</div>

Hi @RodrigoGomes, I hope that you are well!  
Thanks for the additional information.  
I will check internally for you and I will get back to you as soon as possible.  
Thanks for your patience!  
Have a nice day!  
Best,  
Bérangère

---

<div class="post-metadata">

**Author:** ![kennethbrenes](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kennethbrenes/32/31184_2.png) [@kennethbrenes](https://community.hubspot.com/u/kennethbrenes)\
**Post date:** [November 3, 2020, 8:55pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/8 "2020-11-03T20:55:40Z")

</div>

Hi, seems that captcha is not allowed, so how can we control for example bot submissions? or implement more security?

---

<div class="post-metadata">

**Author:** ![GEar](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gear/32/29368_2.png) [@GEar](https://community.hubspot.com/u/GEar)\
**Post date:** [March 2, 2021, 7:34am UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/9 "2021-03-02T07:34:38Z")

</div>

yes i am also looking for the similar answer and the site for which i need suggestions is hosted on wordpress plzguide if you guys know about the right way i need the guidance very urgent to move my data.

---

<div class="post-metadata">

**Author:** ![brayanokorner](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/brayanokorner/32/43030_2.png) [@brayanokorner](https://community.hubspot.com/u/brayanokorner)\
**Post date:** [March 8, 2021, 12:24pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/10 "2021-03-08T12:24:03Z")

</div>

I have the same question please help me get out of this

---

<div class="post-metadata">

**Author:** ![mikehussy1000](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mikehussy1000/32/78108_2.png) [@mikehussy1000](https://community.hubspot.com/u/mikehussy1000)\
**Post date:** [March 15, 2021, 10:50am UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/11 "2021-03-15T10:50:05Z")

</div>

No idea having the same issue please help me get out of this problem

---

<div class="post-metadata">

**Author:** ![RodrigoGomes](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RodrigoGomes](https://community.hubspot.com/u/RodrigoGomes)\
**Post date:** [January 11, 2024, 10:05pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/12 "2024-01-11T22:05:38Z")

</div>

I’m developing a new solution, but I have this same issue, there is a way in the older API, but I can’t be able to find on new API. I’m using private App.

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fapi-reference%2Fmarketing-forms-v3%2Fguide)**

where can I find “Submit data to a form” in the new API?

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [February 21, 2024, 2:44pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/13 "2024-02-21T14:44:28Z")

</div>

Hi @RodrigoGomes and all, I hope that you are well!  
Thank you for reaching out to the Community!  
For more visibility, I’d recommend creating a new post.  
I understand that you’d like to submit data to a form via API. Or are you using an external form and you’d like to see the form submissions into HubSpot?  
Have you already checked this documentation “[Submit data to a form](https://legacydocs.hubspot.com/docs/methods/forms/submit_form)” about this.  
Also, if the question is about API and development, I recommend posting on the [Developers Forum here](https://community.hubspot.com/t5/HubSpot-Developers/ct-p/developers).  
I’d like invite a couple of subject matter experts to this conversation: Hi [@zach\_threadint](https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811), @Teun and @Jnix284 do you have suggestions to help @RodrigoGomes, please?  
If anybody else has anything to add and/or share, please feel free to join in the conversation 🙂  
Thank you very much and have a great day!  
Best,  
Bérangère

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [February 22, 2024, 1:57am UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/14 "2024-02-22T01:57:12Z")

</div>

Hi @RodrigoGomes as [@BérangèreL](https://community.hubspot.com/t5/user/viewprofilepage/user-id/230185) shared, you’ll need the documentation linked to submit data for a form from the latest stable version of the forms API, which isn’t part of the Marketing API Forms Beta that you’ve linked to.

---

<div class="post-metadata">

**Author:** ![RodrigoGomes](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@RodrigoGomes](https://community.hubspot.com/u/RodrigoGomes)\
**Post date:** [February 22, 2024, 4:50pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/15 "2024-02-22T16:50:20Z")

</div>

Bérangère, thanks for response. I already solved my problem just using “[Submit data to a form](https://legacydocs.hubspot.com/docs/methods/forms/submit_form)”, and works very well, but the biggest problem that i don’t know how much time this still works. Because the doc say that’s legacy doc.

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [March 4, 2024, 12:27pm UTC](https://community.hubspot.com/t/send-external-form-data-to-hubspot/17211/16 "2024-03-04T12:27:27Z")

</div>

Hi @RodrigoGomes,  
Thanks for your patience!  
So, to clarify, ‘legacy’ is just referring to the documentation, not the APIs themselves.

APIs provided on the legacy docs are still supported. On developer documentation overview found here [2026-03 API reference - HubSpot docs](https://developers.hubspot.com/docs/api/overview), you’ll see we have a banner which says: _Looking for an older version of the API? They are still stable and supported. Go to legacy docs._

For the specific documentation you’re referring to, the Submit data to a form: [https://legacydocs.hubspot.com/docs/methods/forms/submit\_form\_v3\_authentication](https://legacydocs.hubspot.com/docs/methods/forms/submit_form_v3_authentication), is still the correct API to use. It can be only found in our legacy docs and is just referenced by our current developer docs ([Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/marketing/forms)).

I hope this helps to clarify, but please do let me know if you have any further questions on this!  
Thanks and have a lovely day!  
Best,  
Bérangère
