Git Product home page Git Product logo

activecampaign-api-nodejs's Introduction

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/[email protected]", {});
	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 [email protected].

activecampaign-api-nodejs's People

Contributors

mthommes avatar selipso avatar lks128 avatar c0bra avatar molinto avatar charlieirish avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.