{"library":"mixmax-api","title":"Mixmax API Client","description":"The `mixmax-api` library is a Node.js wrapper that provides a programmatic interface for interacting with the Mixmax platform. It simplifies common operations such as managing email sequences, adding recipients, and leveraging features like polls, Q&A, and sidebars within Mixmax. The current stable version is 1.5.0, with the last release dating back to December 2020. This indicates a slow or paused release cadence, meaning new Mixmax API features might not be immediately supported by this library. Its primary differentiator is offering a convenient JavaScript interface over the raw Mixmax REST API, which is designed for lightweight, real-time interactions and has a rate limit of 120 requests per minute per user and IP address.","language":"javascript","status":"maintenance","last_verified":"Sun Apr 19","install":{"commands":["npm install mixmax-api"],"cli":null},"imports":["const MixmaxAPI = require('mixmax-api');","import MixmaxAPI from 'mixmax-api'; // May require Node.js `--experimental-json-modules` or build step"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const MixmaxAPI = require('mixmax-api');\n\n// IMPORTANT: Replace with your actual Mixmax API key from settings.\n// You can retrieve this key from your Mixmax settings page (Settings -> Integrations -> API).\n// Do NOT hardcode in production; use environment variables.\nconst apiKey = process.env.MIXMAX_API_KEY ?? 'YOUR_SUPER_SECRET_MIXMAX_API_KEY'; \n\nif (!apiKey || apiKey === 'YOUR_SUPER_SECRET_MIXMAX_API_KEY') {\n  console.error('Mixmax API Key is missing. Please set the MIXMAX_API_KEY environment variable or replace the placeholder.');\n  process.exit(1);\n}\n\nconst api = new MixmaxAPI(apiKey);\n\nasync function addRecipientToSequence() {\n  // Replace with an actual sequence ID from your Mixmax account\n  const sequenceID = 'your-mixmax-sequence-id'; \n  const recipientEmail = 'test-recipient@example.com';\n\n  try {\n    const sequence = api.sequences.sequence(sequenceID);\n    const results = await sequence.addRecipients([\n      {\n        email: recipientEmail,\n        variables: {\n          firstName: 'Test',\n          lastName: 'User'\n        }\n      }\n    ]);\n    console.log('Successfully added recipient to sequence:', results);\n  } catch (error) {\n    console.error('Error adding recipient to sequence:', error.message);\n    if (error.response && error.response.data) {\n      console.error('API Error Details:', error.response.data);\n    }\n  }\n}\n\naddRecipientToSequence();","lang":"javascript","description":"This quickstart demonstrates how to initialize the Mixmax API client with an API key and then add a new recipient to a specified email sequence. It highlights the basic authentication and sequence management functionality.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}