Skip to content

n3rfd/activecampaign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Client for ActiveCampaign's v3 - REST API

Build Status codecov Maintainability

Install

This library is distributed on npm. To add it as a dependency, run the following command:

$ npm install activecampaign-rest

Usage

Basic Use Case - Contact.Sync()

const AC = require('activecampaign-rest')

let contact = new AC.Contact({
  'url': 'https://xxx.api-us1.com',
  'token': 'API_TOKEN'
})

let payload = {
  'email': 'john@wick.com',
  'firstName': 'john',
  'lastName': 'wick',
  'phone': '032-123-1234'
}

contact.sync(payload, (err, res) => {
  if (err) {}

  console.log(res)
})

Custom Fields Use Case - Contact.Sync()

const AC = require('activecampaign-rest')

let contact = new AC.Contact({
  'url': 'https://xxx.api-us1.com',
  'token': 'API_TOKEN'
})

let payload = {
  'email': 'john@wick.com',
  'firstName': 'john',
  'lastName': 'wick',
  'phone': '032-123-1234',
  'fields': [
    {
      'name': 'Company',
      'value':'ABC'
    },
    {
      'name': 'License',
      'value':'MIT'
    },
  ]
}

contact.sync(payload, (err, res) => {
  if (err) {}

  console.log(res)
})

About

Node.js Client for ActiveCampaign's v3 - REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published