Socket
Book a DemoInstallSign in
Socket

instantly-api

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

instantly-api

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

latest
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

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": "john@abc.com",
      "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';

FAQs

Package last updated on 25 Feb 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