Unofficial Node.js bindings to the Mautic REST API (version 0.0.4). WIP, low maintenance cadence, limited functionality. Provides a client for contacts, segments, and companies. Key differentiators: asynchronous, promise-based, simple auth with username/password. Less mature than official Mautic PHP SDK but fills gap for Node.js users. Not for production use; security not hardened.
npm install mauticNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates initializing the client with environment variables and fetching contacts list.
Use Basic Auth credentials; configure Mautic to accept basic auth.
Wrap calls in async function or use .then().catch().
Access response.data (axios) or use the raw data as returned.
Parse IDs with parseInt() before passing.
Manually handle pagination with 'start' and 'limit' parameters.
Ensure Mautic server is accessible and baseUrl is correct (e.g., 'http://localhost:8080/api')
Use 'new Mautic(...)' or 'Mautic.default(...)' if using ES import
Upgrade Node.js to >=10 or use var/function syntax