<?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: Send leads to Hubspot CRM via API from an external form in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Send-leads-to-Hubspot-CRM-via-API-from-an-external-form/m-p/1090713#M79295</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/879483"&gt;@SKuvent&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to use this API, you will need to use the Bearer Token that you can obtain by setting up a &lt;A href="https://developers.hubspot.com/docs/guides/apps/private-apps/overview" target="_blank" rel="noopener"&gt;Private App&lt;/A&gt; on HubSpot. There you will select the necessary scopes and will receive the &lt;A href="https://developers.hubspot.com/docs/guides/apps/private-apps/overview#make-api-calls-with-your-app-s-access-token" target="_blank" rel="noopener"&gt;Access Token&lt;/A&gt; that you will use to make the API call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;STRONG&gt;/submissions/v2/post/upload/secure/:portalId/:formGuid&lt;/STRONG&gt; endpoint will require the "forms" scope.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To see more details regarding the form submission endpoint, see this document:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/reference/api/marketing/forms/v2#submit-data-to-a-form-supporting-authentication" target="_blank"&gt;https://developers.hubspot.com/docs/reference/api/marketing/forms/v2#submit-data-to-a-form-supporting-authentication&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jan 2025 15:32:13 GMT</pubDate>
    <dc:creator>evaldas</dc:creator>
    <dc:date>2025-01-07T15:32:13Z</dc:date>
    <item>
      <title>Send leads to Hubspot CRM via API from an external form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Send-leads-to-Hubspot-CRM-via-API-from-an-external-form/m-p/1090599#M79291</link>
      <description>&lt;P&gt;We have a form on our site that is not built in Hubspot.&lt;/P&gt;&lt;P&gt;We want to send leads to Hubspot CRM via an API.&lt;/P&gt;&lt;P&gt;One of my partners is using this format but it gives us a 400 error message:&lt;BR /&gt;&lt;SPAN&gt;&lt;A href="https://forms.hubspot.com/uploads/form/v2/:portlID/:guid" target="_blank" rel="noopener"&gt;https://forms.hubspot.com/uploads/form/v2/:portlID/:guid&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When trying to use this format, we get a 401 (unautherized)&lt;BR /&gt;&lt;A href="https://api.hsforms.com/submissions/v3/integration/secure/submit/portalID/guid" target="_blank" rel="noopener"&gt;https://api.hsforms.com/submissions/v3/integration/secure/submit/portalID/guid&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;What should I do to receive leads? What url structure should I use and do I need an oath / API key? And if so, where can I set it and how to use it?&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 12:01:01 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Send-leads-to-Hubspot-CRM-via-API-from-an-external-form/m-p/1090599#M79291</guid>
      <dc:creator>SKuvent</dc:creator>
      <dc:date>2025-01-07T12:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Send leads to Hubspot CRM via API from an external form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Send-leads-to-Hubspot-CRM-via-API-from-an-external-form/m-p/1090713#M79295</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/879483"&gt;@SKuvent&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to use this API, you will need to use the Bearer Token that you can obtain by setting up a &lt;A href="https://developers.hubspot.com/docs/guides/apps/private-apps/overview" target="_blank" rel="noopener"&gt;Private App&lt;/A&gt; on HubSpot. There you will select the necessary scopes and will receive the &lt;A href="https://developers.hubspot.com/docs/guides/apps/private-apps/overview#make-api-calls-with-your-app-s-access-token" target="_blank" rel="noopener"&gt;Access Token&lt;/A&gt; that you will use to make the API call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;STRONG&gt;/submissions/v2/post/upload/secure/:portalId/:formGuid&lt;/STRONG&gt; endpoint will require the "forms" scope.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To see more details regarding the form submission endpoint, see this document:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/reference/api/marketing/forms/v2#submit-data-to-a-form-supporting-authentication" target="_blank"&gt;https://developers.hubspot.com/docs/reference/api/marketing/forms/v2#submit-data-to-a-form-supporting-authentication&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 15:32:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Send-leads-to-Hubspot-CRM-via-API-from-an-external-form/m-p/1090713#M79295</guid>
      <dc:creator>evaldas</dc:creator>
      <dc:date>2025-01-07T15:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Send leads to Hubspot CRM via API from an external form</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Send-leads-to-Hubspot-CRM-via-API-from-an-external-form/m-p/1093333#M79438</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/879483"&gt;@SKuvent&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;on form submit call an API end point to your server. In the server side use the HubSpot API (curl provided below) to create contact in your instance. You have the create a pvt app and provide contact create and update scope to it, then it will create a access token which you have to use to hit the HubSpot endpoint. If you want to send the HubSpot properties then use their internal name from instance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl --request POST \
  --url https://api.hubapi.com/crm/v3/objects/contacts \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'content-type: application/json' \
  --data '{
  "associations": [
    {
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 0
        }
      ],
      "to": {
        "id": "string"
      }
    }
  ],
  "objectWriteTraceId": "string",
  "properties": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  }
}'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-sheets-root="1"&gt;I hope this will help you out. Please mark it as &lt;STRONG&gt;Solution Accepted and upvote&lt;/STRONG&gt; to help another Community member.&lt;BR /&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 13:57:53 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Send-leads-to-Hubspot-CRM-via-API-from-an-external-form/m-p/1093333#M79438</guid>
      <dc:creator>GRajput</dc:creator>
      <dc:date>2025-01-13T13:57:53Z</dc:date>
    </item>
  </channel>
</rss>

