Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hubspot/api-client

Package Overview
Dependencies
Maintainers
29
Versions
76
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

  • 12.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
362K
increased by55.45%
Maintainers
29
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

FAQs

Package last updated on 23 Sep 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc