<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Form API in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/318083#M30487</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/119350"&gt;@Niuscha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the clarification!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When looking to send non-HubSpot form data, you can use the&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/forms/submit_form_v3" target="_blank"&gt;Submit data for a form (AJAX support) | Forms API&lt;/A&gt;&amp;nbsp;or&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/forms/submit_form" target="_blank"&gt;Submit data to a form | HubSpot Forms API&lt;/A&gt;. Once the form data has been submitted over to HubSpot successfully, contact will be created successfully. You do not have to call another endpoint to create contact.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2020 01:10:47 GMT</pubDate>
    <dc:creator>WendyGoh</dc:creator>
    <dc:date>2020-02-11T01:10:47Z</dc:date>
    <item>
      <title>Form API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/317669#M30446</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to Hubspot and need to understand how I can use the different HubSpot APIs. I want to capture all the contact detail from my landing page FORM and add them to contacts via API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please support?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Niuscha&lt;/P&gt;</description>
      <pubDate>Sat, 08 Feb 2020 14:01:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/317669#M30446</guid>
      <dc:creator>Niuscha</dc:creator>
      <dc:date>2020-02-08T14:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Form API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/317764#M30455</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/119350"&gt;@Niuscha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to clarify, is the form on your landing page a HubSpot form? If it is a HubSpot form, upon a form submission &amp;gt; contacts will automatically be created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it's not a HubSpot form, have you explore the option of toggling on the non-HubSpot form feature (&lt;A href="https://knowledge.hubspot.com/forms/use-non-hubspot-forms" target="_blank"&gt;Use non-HubSpot forms&lt;/A&gt;)? So that contacts are automatically created within HubSpot.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the above option are not something that your team had like to look into, upon getting your landing page form details, you can use the&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/contacts/batch_create_or_update" target="_blank"&gt;Create or update a group of contacts | Contacts API&lt;/A&gt;&amp;nbsp;to create contacts within HubSpot.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps to shed some lights and do let me know if you'd further clarification on this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 02:27:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/317764#M30455</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-02-10T02:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Form API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/317986#M30482</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your suport! It is a none-Hubspot form. I have created a website with Bootstrap and want to connect it to Hubspot via Hubspot APIs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your support&amp;nbsp;&lt;/P&gt;&lt;P&gt;Niuscha&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 21:08:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/317986#M30482</guid>
      <dc:creator>Niuscha</dc:creator>
      <dc:date>2020-02-10T21:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Form API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/318083#M30487</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/119350"&gt;@Niuscha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the clarification!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When looking to send non-HubSpot form data, you can use the&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/forms/submit_form_v3" target="_blank"&gt;Submit data for a form (AJAX support) | Forms API&lt;/A&gt;&amp;nbsp;or&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/forms/submit_form" target="_blank"&gt;Submit data to a form | HubSpot Forms API&lt;/A&gt;. Once the form data has been submitted over to HubSpot successfully, contact will be created successfully. You do not have to call another endpoint to create contact.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 01:10:47 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/318083#M30487</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-02-11T01:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Form API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/318180#M30508</link>
      <description>&lt;P&gt;Thanks for the great support.&lt;/P&gt;&lt;P&gt;This is my first time using an API.&lt;/P&gt;&lt;P&gt;How do I embed the API in my website?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for the great support&lt;/P&gt;&lt;P&gt;Niuscha&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 12:16:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/318180#M30508</guid>
      <dc:creator>Niuscha</dc:creator>
      <dc:date>2020-02-11T12:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Form API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/318412#M30527</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/119350"&gt;@Niuscha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When looking to submit HubSpot form using an API, your developer will have to ensure that they are posting the form data matching the JSON body below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{
  "submittedAt": "1517927174000", // This millisecond timestamp is optional. Update the value from "1517927174000" to avoid an INVALID_TIMESTAMP error.
  "fields": [
    {
      "name": "email",
      "value": "example@example.com"
    },
    {
      "name": "firstname",
      "value": "Jeff"
    }
  ],
  "context": {
    "hutk": ":hutk", // include this parameter and set it to the hubspotutk cookie value to enable cookie tracking on your submission
    "pageUri": "www.example.com/page",
    "pageName": "Example page"
  },
  "legalConsentOptions": {
    "consent": { // Include this object when GDPR options are enabled
      "consentToProcess": true,
      "text": "I agree to allow Example Company to store and process my personal data.",
      "communications": [
        {
          "value": true,
          "subscriptionTypeId": 999,
          "text": "I agree to receive marketing communications from Example Company."
        }
      ]
    }
  }
}&lt;/PRE&gt;
&lt;P&gt;On this documentation -&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/forms/submit_form_v3" target="_blank"&gt;Submit data for a form (AJAX support) | Forms API&lt;/A&gt;&amp;nbsp;&amp;gt; We have an example code on how you can use the formv3 endpoint on nodeJS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do not have a developer team, I'd advise you to&amp;nbsp;&lt;A href="https://knowledge.hubspot.com/forms/use-non-hubspot-forms" target="_blank"&gt;Use non-HubSpot forms&lt;/A&gt; by toggling on the `&lt;STRONG&gt;Collect data from website forms`&amp;nbsp;&lt;/STRONG&gt;settings.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 01:08:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/318412#M30527</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-02-12T01:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Form API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/318940#M30593</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your great support. So to explain the situation in full:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- I have created a landing page with a form using the Bootstrap Framework&lt;/P&gt;&lt;P&gt;- This means I have used HTML code to create the landing page&lt;/P&gt;&lt;P&gt;- Now I need to connect my lading page form with Hubspot&lt;/P&gt;&lt;P&gt;- The form is not from Hubspot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand to use this Hubspot API:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/methods/forms/submit_form_v3" target="_blank"&gt;https://developers.hubspot.com/docs/methods/forms/submit_form_v3&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And my question is do I copy the Json code into my HTML code in order to transform the data from my none Hubspot form to Hubspot?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please advise!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Niuscha&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 11:14:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/318940#M30593</guid>
      <dc:creator>Niuscha</dc:creator>
      <dc:date>2020-02-13T11:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Form API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/319213#M30624</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/119350"&gt;@Niuscha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The JSON code is an example of the data body. The actual AJAX function that you would need to include in your HTML code is something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;function formv3(){
    // Create the new request 
    var xhr = new XMLHttpRequest();
    var url = 'https://api.hsforms.com/submissions/v3/integration/submit/62515/fcc69886-915b-4fef-b35f-27850ef461e1'
    
    // Example request JSON:
    var data = {
      "submittedAt": "1517927174000",
      "fields": [
        {
          "name": "email",
          "value": "example@example.com"
        },
        {
          "name": "firstname",
          "value": "Jeff"
        }
      ],
      "context": {
        "hutk": ':hutk', // include this parameter and set it to the hubspotutk cookie value to enable cookie tracking on your submission
        "pageUri": "www.example.com/page",
        "pageName": "Example page"
      },
      "legalConsentOptions":{ // Include this object when GDPR options are enabled
        "consent":{
          "consentToProcess":true,
          "text":"I agree to allow Example Company to store and process my personal data.",
          "communications":[
            {
              "value":true,
              "subscriptionTypeId":999,
              "text":"I agree to receive marketing communications from Example Company."
            }
          ]
        }
      }
    }

    var final_data = JSON.stringify(data)

    xhr.open('POST', url);
    // Sets the value of the 'Content-Type' HTTP request headers to 'application/json'
    xhr.setRequestHeader('Content-Type', 'application/json');

    xhr.onreadystatechange = function() {
        if(xhr.readyState == 4 &amp;amp;&amp;amp; xhr.status == 200) { 
            alert(xhr.responseText); // Returns a 200 response if the submission is successful.
        } else if (xhr.readyState == 4 &amp;amp;&amp;amp; xhr.status == 400){ 
            alert(xhr.responseText); // Returns a 400 error the submission is rejected.          
        } else if (xhr.readyState == 4 &amp;amp;&amp;amp; xhr.status == 403){ 
            alert(xhr.responseText); // Returns a 403 error if the portal isn't allowed to post submissions.           
        } else if (xhr.readyState == 4 &amp;amp;&amp;amp; xhr.status == 404){ 
            alert(xhr.responseText); //Returns a 404 error if the formGuid isn't found     
        }
       }


    // Sends the request 
    
    xhr.send(final_data)
 }
&lt;/PRE&gt;
&lt;P&gt;This can be found on this documentation -&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/forms/submit_form_v3" target="_blank"&gt;Submit data for a form (AJAX support) | Forms API&lt;/A&gt;&amp;nbsp;&amp;gt; Under the 'Node JS' tab.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would need to include this piece of code (and modify accordingly) as a javascript which means it is within the &amp;lt;script&amp;gt; &amp;lt;/script&amp;gt; tag.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 01:54:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/319213#M30624</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-02-14T01:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Form API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/319302#M30655</link>
      <description>&lt;P&gt;Thanks for&amp;nbsp; you amazing support! I will try it at the weekend &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 12:57:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/319302#M30655</guid>
      <dc:creator>Niuscha</dc:creator>
      <dc:date>2020-02-14T12:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Form API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/383769#M37796</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/66274"&gt;@WendyGoh&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is there a way to add more security in those forms? I mean, to avoid bots submissions what is the best practice around?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 22:41:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/383769#M37796</guid>
      <dc:creator>kennethbrenes</dc:creator>
      <dc:date>2020-11-03T22:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Form API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/383791#M37802</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/144284"&gt;@kennethbrenes&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mentioned by Jenny on this dev forum &lt;A href="https://community.hubspot.com/t5/Lead-Capture-Tools/Fake-Form-Completions/td-p/174412" target="_blank" rel="noopener"&gt;here,&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;From within HubSpot you can enable captcha and block free email providers or specific domains from submitting the form. I wanted to share &lt;A href="https://knowledge.hubspot.com/forms/prevent-spam-form-submissions" target="_blank" rel="noopener"&gt;this article&lt;/A&gt; which outlines this for your reference.&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hope this helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 07:18:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Form-API/m-p/383791#M37802</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2020-11-04T07:18:43Z</dc:date>
    </item>
  </channel>
</rss>

