Socket
Book a DemoInstallSign in
Socket

@hubspot/api-client

Package Overview
Dependencies
Maintainers
32
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hubspot/api-client

NodeJS v3 [HubSpot API](https://developers.hubspot.com/docs/api/overview) SDK(Client) files

13.2.0
latest
Source
npmnpm
Version published
Weekly downloads
517K
1.36%
Maintainers
32
Weekly downloads
 
Created

What is @hubspot/api-client?

The @hubspot/api-client npm package is a comprehensive client library for interacting with HubSpot's APIs. It allows developers to easily integrate HubSpot's CRM, marketing, sales, and service functionalities into their applications.

What are @hubspot/api-client's main functionalities?

CRM

This feature allows you to manage CRM functionalities such as creating, reading, updating, and deleting contacts. The code sample demonstrates how to create a new contact in HubSpot.

const hubspot = require('@hubspot/api-client');
const hubspotClient = new hubspot.Client({ apiKey: 'your-api-key' });

async function createContact() {
  const contactObj = { properties: { firstname: 'John', lastname: 'Doe', email: 'john.doe@example.com' } };
  const createResponse = await hubspotClient.crm.contacts.basicApi.create(contactObj);
  console.log(createResponse);
}

createContact();

Marketing

This feature allows you to manage marketing functionalities such as creating and managing email campaigns. The code sample demonstrates how to create a new email campaign in HubSpot.

const hubspot = require('@hubspot/api-client');
const hubspotClient = new hubspot.Client({ apiKey: 'your-api-key' });

async function createEmailCampaign() {
  const emailCampaignObj = { name: 'New Campaign', subject: 'Hello World', fromName: 'Your Company', fromEmail: 'info@yourcompany.com' };
  const createResponse = await hubspotClient.marketing.emailCampaigns.create(emailCampaignObj);
  console.log(createResponse);
}

createEmailCampaign();

Sales

This feature allows you to manage sales functionalities such as creating, reading, updating, and deleting deals. The code sample demonstrates how to create a new deal in HubSpot.

const hubspot = require('@hubspot/api-client');
const hubspotClient = new hubspot.Client({ apiKey: 'your-api-key' });

async function createDeal() {
  const dealObj = { properties: { dealname: 'New Deal', amount: '1000', dealstage: 'qualifiedtobuy' } };
  const createResponse = await hubspotClient.crm.deals.basicApi.create(dealObj);
  console.log(createResponse);
}

createDeal();

Service

This feature allows you to manage service functionalities such as creating, reading, updating, and deleting tickets. The code sample demonstrates how to create a new support ticket in HubSpot.

const hubspot = require('@hubspot/api-client');
const hubspotClient = new hubspot.Client({ apiKey: 'your-api-key' });

async function createTicket() {
  const ticketObj = { properties: { subject: 'Support Request', content: 'Need help with product', hs_pipeline: '0', hs_pipeline_stage: '1' } };
  const createResponse = await hubspotClient.crm.tickets.basicApi.create(ticketObj);
  console.log(createResponse);
}

createTicket();

Other packages similar to @hubspot/api-client

Keywords

hubspot

FAQs

Package last updated on 01 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.