To access the HubSpot API, you need to create a private app. Learn more: Hubspot API Access
const axios = require("axios");
await axios.post(
"https://api.hubapi.com/crm/v3/objects/contacts",
{
"firstname": input.firstname,
"lastname": input.lastname,
"email": input.email,
},
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${variables.HUBSPOT_ACCESS_TOKEN}`,
},
}
);
Learn how you can create Custom HTML Forms, which create Hubspot entities.
[Read more]