JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2322
  • Score
    100M100P100Q134970F

Node.js wrapper for the ActiveCampaign API

Package Exports

  • activecampaign

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (activecampaign) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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("http://ACCOUNT.api-us1.com", "iy837huygda7dsgy");

// TEST API credentials
var test = ac.credentials_test(function(response) {
    console.log(response);
});

// GET requests

var account = ac.api("account/view", {}, function(response) {
    console.log(response);

    if (response.success) {

        // successful request

    }
    else {

        // request error
        console.log(response.error);

    }
});

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

// 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, function(response) {
    console.log(response);
});

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.