Registry / marketing / drip-nodejs

drip-nodejs

JSON →
library3.1.4jsnpmunverified

A complete Node.js wrapper for the Drip v2 REST API, simplifying integration with Drip's email marketing platform. Version 3.1.4 (stable, infrequent releases) introduces breaking changes that simplify payload schemas for batch endpoints, moving from nested structures to flat arrays. Key differentiators: handles authentication (API token or OAuth2) and provides promise-based methods with optional callback support. Compared to alternatives, this is the official community-maintained library for Drip integrations.

npm install drip-nodejs
INSTALL
IMPORT
SIG · DRIP-NODEJS
D
drip-nodejs
marketingjavascriptv3.1.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const client = require('drip-nodejs')({ token: '...', accountId: '...' })
import { Drip } from 'drip-nodejs'
The package exports a factory function as default. ESM: import drip from 'drip-nodejs'; const client = drip({...}).
default
const drip = require('drip-nodejs'); const client = drip({ token: '...', accountId: '...' })
const DripClient = require('drip-nodejs').DripClient
No named export; the factory is the default export.
client
client.listAccounts().then(accounts => ...)
client.listAccounts(callback, err => ...)
Methods return promises; callback is optional second argument. batchSubscribers requires callback only.

Initializes the client with API token and account ID, then lists campaigns using a promise.

const drip = require('drip-nodejs'); const client = drip({ token: process.env.DRIP_API_TOKEN ?? '', accountId: process.env.DRIP_ACCOUNT_ID ?? '' }); async function main() { try { const campaigns = await client.listCampaigns(); console.log('Campaigns:', campaigns); } catch (err) { console.error('Error:', err); } } main();
Debug
Known issues
breakingBatch endpoint payloads changed from nested to flat arrays in v3.0.0.
fix
For batch events, pass an array of objects directly instead of { batches: [ { events: [...] } ] }.
affects: >=3.0.0
gotchaThe `updateBatchSubscribers` method only supports callbacks, not promises.
fix
Use callback parameter: client.updateBatchSubscribers(subscribers, callback).
affects: >=1.0.0
gotchaWhen using OAuth2, you must specify tokenType: 'Bearer' or similar.
fix
Include tokenType in config object: { token: '...', tokenType: 'Bearer', accountId: '...' }.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: client.listCampaigns is not a function
Forgetting to invoke the factory function; client is still the factory function.
fix
const client = drip({...}); not const client = drip;
Error: Request failed with status code 401
Invalid or missing API token or account ID.
fix
Check DRIP_API_TOKEN and DRIP_ACCOUNT_ID environment variables.
Upgrade
Version history
3.1.4latest on npm
Audit
Dependencies
axiosrequiredHTTP client for API requests
Agent activity
34 hits · last 30 days
node
30
OpenAI (training)
1
Resources
drip-nodejs — npm install drip-nodejs · libregistry