Node client for the intercom.io api
intercom-api uses Stallion so it's minimal code, easy to add new methods and promised based
Installation
npm install intercom-api --save
Support Resources
All methods are supported on all the below resources
* https://api.intercom.io/admins* https://api.intercom.io/companies* https://api.intercom.io/contacts* https://api.intercom.io/counts* https://api.intercom.io/events* https://api.intercom.io/notes* https://api.intercom.io/segments* https://api.intercom.io/tags* https://api.intercom.io/users
Overview
intercom.io is a simple wrapper around the Intercom.io api so requests and responses follow their documentation
All methods return a ES6 promise.
Creating a client
require Intercom = ; // You can find these in your app's integrations page under the "API Keys" sectionvar app_id = 'jbslxytr';var api_key = '72cdef54ab2f9ecc53cc806a1b6c4ab3d40f14a4'; var intercom = app_id api_key;
Users
For the complete list of user attributes for the request & response see the User Model
var data = user_id: 123 email: 'joe.montana@intercom.io' name: 'Joe Montana'}; intercom;
Companies
Will add more examples soon, but they all follow the same pattern just take a look at the Intercom.io api docs
Todo
- Add support for https://api.intercom.io/conversations
- Add support for https://api.intercom.io/messages
- Add convenience method to get users for a company
- Add convenience method to remove a company from user
- Add convenience method to add a company to user
- Add convenience methods to
- Add tag to users & companies (tagUser, tagUsers, tagCompany, tagCompanies)
- Remove tag from users & companies
- What about adding multiple tags?