🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@nextengage/sdk

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextengage/sdk

Official TypeScript SDK for the NextEngage marketing platform (contacts, events, segments, campaigns).

Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
25
8.7%
Maintainers
1
Weekly downloads
 
Created
Source

@nextengage/sdk

Official TypeScript SDK for the NextEngage marketing platform.

Install

pnpm add @nextengage/sdk

Usage

import { NextEngage } from "@nextengage/sdk";

const ne = new NextEngage({
  apiKey: process.env.NEXTENGAGE_API_KEY!, // ne_...
  baseUrl: "https://api.nextengage.io",        // API origin; defaults to localhost:3001
});

// Upsert a contact (by email)
await ne.contacts.upsert({
  email: "ada@example.com",
  attributes: { country: "IN", plan: "pro" },
});

// Track a behavioral event (feeds dynamic segments)
await ne.contacts.track({ email: "ada@example.com", name: "purchased", properties: { amount: 49 } });

// Bulk import
await ne.contacts.bulkImport([
  { email: "a@x.com" },
  { email: "b@x.com", attributes: { vip: true } },
]);

// Create + send a campaign
const tpl = await ne.templates.create({ name: "Promo", subject: "Hi {{ email }}", body: "<p>Sale!</p>" });
const campaign = await ne.campaigns.create({ name: "Spring", templateId: tpl.id, fromEmail: "news@acme.com" });
await ne.campaigns.send(campaign.id);

The API key is scoped to a single project; the SDK resolves the project id automatically from /me.

Error handling

Failed requests throw NextEngageError with status and parsed body.

Keywords

nextengage

FAQs

Package last updated on 10 Jun 2026

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