npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

instantly-api

v0.0.7

Published

This package provides a convenient way to access the Instantly.ai API.

Downloads

77

Readme

Instantly API Package

This package provides a convenient way to access the Instantly.ai API.

Installation

To install the package, you can use the following command in your terminal:

npm install instantly-api

Configuration

Make sure the INSTANTLY_API_KEY env variable is defined in your environment to authenticate requests.

Import

import instantly from 'instantly-api';

Available Functions

Ping

Ping the instantly API to verify connectivity and authentication.

const result = await instantly.ping();

Campaigns

List Campaigns

Retrieve a list of all campaigns. NOTE: Currently this is bugged in instantly itself so always returns an empty array. Once they fix it this will work.

const result = await instantly.campaigns.list();

Get Campaign Name

Get the name of a specific campaign by its ID.

const campaignId = '00000000-0000-0000-0000-000000000000';
const result = await instantly.campaigns.getName(campaignId);

Get Campaign Status

Fetch the status of a specific campaign.

const campaignId = '00000000-0000-0000-0000-000000000000';
const result = await instantly.campaigns.getStatus(campaignId);

Get Campaign Accounts

Retrieve accounts associated with a specific campaign.

const campaignId = '00000000-0000-0000-0000-000000000000';
const result = await instantly.campaigns.getAccounts(campaignId);

Get Campaign Summary

Provide a summary of a specific campaign, including lead statuses.

const campaignId = '00000000-0000-0000-0000-000000000000';
const result = await instantly.campaigns.getSummary(campaignId);

Leads

Add Campaign Leads

Add leads to a specific campaign, with an option to skip if already in the workspace.

const campaignId = '00000000-0000-0000-0000-000000000000';

const leads = [[
    {
      "email": "[email protected]",
      "first_name": "John",
      "last_name": "Doe",
      "company_name": "Instantly",
      "personalization": "Loved your latest post",
      "phone": "123456789",
      "website": "instantly.ai",
      "custom_variables": {
        "favorite_restaurant": "Mi Cancun",
        "language": "English"
      }
    }
];

const options = {
  skipIfInWorkspace: true 
};

const result = await instantly.leads.addToCampaign(campaignId, leads, options);

Types

InstantlyLead

Defines the structure for a lead object.

import type { InstantlyLead } from 'instantly-api';