Skip to content
Node.js wrapper for the ActiveCampaign API
Branch: master
Clone or download
Latest commit b52e087 Mar 13, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example Included a reseller API request example Jul 14, 2015
lib Merge pull request #33 from perfectsoft-tunisia/master Mar 9, 2018
.gitignore added example folder Aug 2, 2014
.npmignore adding updates for Deals, event tracking, etc - this is way behind Aug 2, 2014
LICENSE
README.md
package.json

README.md

ActiveCampaign Node.js API wrapper

Official Node.js wrapper for the ActiveCampaign API.

Installation

Install using NPM:

npm install activecampaign

If you don't use NPM, try this:

git clone git://github.com/ActiveCampaign/activecampaign-api-nodejs.git activecampaign

Requirements

  1. Valid ActiveCampaign hosted account.

Example Usage

	var ActiveCampaign = require("activecampaign");

	var ac = new ActiveCampaign("https://ACCOUNT.api-us1.com", {{KEY}});

	// TEST API credentials
	ac.credentials_test().then(function(result) {
		// successful request
		if (result.success) {
			// VALID ACCOUNT
		} else {
			// INVALID ACCOUNT
		}
	}, function(result) {
		// request error
	});

	// GET requests

	var account_view = ac.api("account/view", {});
	account_view.then(function(result) {
		// successful request
		console.log(result);
	}, function(result) {
		// request error
	});

	var contact_exists = ac.api("contact/view?email=test@example.com", {});
	contact_exists.then(function(result) {
		// successful request
		console.log(result);
	}, function(result) {
		// request error
	});

	// POST request

	var list = {
		name: "List 3",
		sender_name: "My Company",
		sender_addr1: "123 S. Street",
		sender_city: "Chicago",
		sender_zip: "60601",
		sender_country: "USA"
	};

	var list_add = ac.api("list/add", list);
	list_add.then(function(result) {
		// successful request
		console.log(result);
	}, function(result) {
		// request error
	});

Full Documentation

View our full API documentation.

Reporting Issues

We'd love to help if you have questions or problems. Report issues using the Github Issue Tracker or email help@activecampaign.com.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.