
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
drip-nodejs
Advanced tools
A complete Nodejs wrapper for the Drip REST API.
npm install drip-nodejs --save
For private use and integrations, use your API Token found here. Create a new instance of the client library with:
var client = require('drip-nodejs')({ token: YOUR_API_KEY });
For most API methods, you'll need your Drip Account ID found here. Most client methods accept an account ID argument which allows interaction with any account maintained in your Drip account.
The following methods are currently available on the client instance. You can find a detailed explanation of all methods and their effect on resources in your Drip account here.
Action | Method |
---|---|
List all accounts | client.listAccounts(callback) |
Fetch an account | client.fetchAccount(account_id, callback) |
Action | Method |
---|---|
List broadcasts | client.listBroadcasts(accountId, callback, status) |
Fetch a broadcast | client.fetchBroadcast(accountId, broadcastId, callback) |
Action | Method |
---|---|
List all campaigns | client.listCampaigns(accountId, callback, status) |
Fetch a campaign | client.fetchCampaign(accountId, campaignId, callback) |
Activate a campaign | client.activateCampaign(accountId, campaignId, callback) |
Pause a campaign | client.pauseCampaign(accountId, campaignId, callback) |
List specific campaign's subscribers | client.listAllSubscribesToCampaign(accountId, campaignId, callback) |
Subscribe to a campaign | client.subscribeToCampaign(accountId, campaignId, payload, callback) |
Action | Method |
---|---|
List campaign subscriptions | client.subscriberCampaignSubscriptions(accountId, subscriberId, callback) |
Action | Method |
---|---|
List all conversions | client.listConversions(accountId, callback, status) |
Fetch a conversion | client.fetchConversion(accountId, conversionId, callback) |
Action | Method |
---|---|
List all custom fields | client.listAllCustomFields(accountId, callback) |
Action | Method |
---|---|
Record an event | client.recordEvent(accountId, payload, callback) |
Record a batch of events | client.recordBatchEvents(accountId, payload, callback) |
List all events in account | client.listEventActions(accountId, callback, options) |
Action | Method |
---|---|
List all forms | client.listForms(accountId, callback) |
Fetch a form | client.fetchForm(accountId, formId, callback) |
Action | Method |
---|---|
List all purchases | client.listPurchases(accountId, emailOrId, callback) |
Create a purchase | client.createPurchase(accountId, emailOrId, payload, callback) |
Fetch a purchase | client.fetchPurchase(accountId, emailOrId, purchaseId, callback) |
Action | Method |
---|---|
List all subscribers | client.listSubscribers(accountId, callback) |
Update a subscriber | client.updateSubscriber(accountId, payload, callback) |
Fetch a subscriber | client.fetchSubscriber(accountId, emailOrId, callback) |
Unsubscribe from a campaign | client.unsubscribeFromCampaign(accountId, emailOrId, campaignId, callback) |
Unsubscribe from all mailings | client.unsubscribeFromAllMailings(accountId, emailOrId, callback) |
Delete s subscriber | client.deleteSubscriber(accountId, emailOrId, callback) |
Action | Method |
---|---|
List all tags | client.listAllTags(accountId, callback) |
Tag a subscriber | client.tagSubscriber(accountId, tags, email, callback) |
Remove tag from subscriber | client.removeSubscriberTag(accountId, email, tag, callback) |
Action | Method |
---|---|
Fetch authenticated user | client.fetchUser(callback) |
Action | Method |
---|---|
List all webhooks | client.listWebhooks(accountId) |
Fetch a webhook | client.fetchWebhook(accountId, webhookId, callback) |
Create a webhook | client.createWebhook(accountId, payload, callback) |
Destroy a webhook | client.destroyWebhook(accountId, webhookId, callback) |
Action | Method |
---|---|
List all workflows | client.listAllWorkflows(accountId, callback, status) |
Fetch a workflow | client.fetchWorkflow(accountId, workflowId, callback) |
Activate a workflow | client.activateWorkflow(accountId, workflowId, callback) |
Pause a workflow | client.pauseWorkflow(accountId, workflowId, callback) |
Start a subscriber on a workflow | client.startOnWorkflow(accountId, workflowId, payload, callback) |
Remove a subscriber from a workflow | client.removeFromWorkflow(accountId, workflowId, emailOrId, callback) |
Action | Method |
---|---|
List all workflow triggers | client.listTriggers(accountId, workflowId, callback) |
Create a workflow trigger | client.createTrigger(accountId, workflowId, payload, callback) |
Update a trigger | client.updateTrigger(accountId, workflowId, triggerId, payload, callback) |
See the official REST API docs for a complete API reference.
The listCampaigns
method accepts an optional status
argument to filter the response be campaign's status in your account:
// Fetching only active campaigns
client.listCampaigns(9999999, function (error, response, body) {
console.log(body)
}, "active")
// This fetches all campaigns by default
client.listCampaigns(9999999, function (error, response, body) {
console.log(body)
})
The recordBatchEvents
methods takes a batch object for the payload and is most suitable for sending thousands of events.
var batch = {
"batches": [{
"events": [
{
"email": "john@acme.com",
"action": "Opened a door"
},
{
"email": "joe@acme.com",
"action": "Closed a door"
}
// Lots more events...
]
}]
}
client.recordBatchEvents(2271521, batch, function (error, response, body) {
// Do stuff
}
)
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Note: Jasmine is used for testing
FAQs
A complete NodeJS wrapper for connecting to the Drip v2 REST API
The npm package drip-nodejs receives a total of 1,925 weekly downloads. As such, drip-nodejs popularity was classified as popular.
We found that drip-nodejs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.