Registry / communication / mixmax-api

mixmax-api

JSON →
library1.5.0jsnpmunverified

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.

npm install mixmax-api
INSTALL
IMPORT
SIG · MIXMAX-API
M
mixmax-api
communicationjavascriptv1.5.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MixmaxAPI
const MixmaxAPI = require('mixmax-api');
import MixmaxAPI from 'mixmax-api';
The library primarily uses CommonJS `require` syntax as demonstrated in its documentation. While Node.js supports ESM, this package is not explicitly set up for it, and a direct `import` might not work as expected without transpilation or specific Node.js configuration for CJS interoperability.
MixmaxAPI (ESM approximation)
import MixmaxAPI from 'mixmax-api'; // May require Node.js `--experimental-json-modules` or build step
import { MixmaxAPI } from 'mixmax-api';
Although the package is not explicitly designed for ESM, if your project is pure ESM, you might be able to import it as a default export, potentially requiring `--experimental-json-modules` in Node.js or a build step to handle CJS modules. Named imports are generally incorrect for modules exporting a single constructor/class via CommonJS `module.exports = ...`.

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.

const MixmaxAPI = require('mixmax-api'); // IMPORTANT: Replace with your actual Mixmax API key from settings. // You can retrieve this key from your Mixmax settings page (Settings -> Integrations -> API). // Do NOT hardcode in production; use environment variables. const apiKey = process.env.MIXMAX_API_KEY ?? 'YOUR_SUPER_SECRET_MIXMAX_API_KEY'; if (!apiKey || apiKey === 'YOUR_SUPER_SECRET_MIXMAX_API_KEY') { console.error('Mixmax API Key is missing. Please set the MIXMAX_API_KEY environment variable or replace the placeholder.'); process.exit(1); } const api = new MixmaxAPI(apiKey); async function addRecipientToSequence() { // Replace with an actual sequence ID from your Mixmax account const sequenceID = 'your-mixmax-sequence-id'; const recipientEmail = 'test-recipient@example.com'; try { const sequence = api.sequences.sequence(sequenceID); const results = await sequence.addRecipients([ { email: recipientEmail, variables: { firstName: 'Test', lastName: 'User' } } ]); console.log('Successfully added recipient to sequence:', results); } catch (error) { console.error('Error adding recipient to sequence:', error.message); if (error.response && error.response.data) { console.error('API Error Details:', error.response.data); } } } addRecipientToSequence();
Debug
Known issues
breakingVersion 1.3.0 included a fix to 'update HTTP calls to use new format'. While described as a fix, this indicates changes to the underlying Mixmax API or how the wrapper interacts with it. Older versions might experience connectivity issues or incorrect behavior if the Mixmax API has since diverged significantly.
fix
Ensure you are using `mixmax-api` version 1.3.0 or higher. Regularly test API interactions after any Mixmax platform updates or if you experience unexpected errors with older library versions.
affects: >=1.3.0
gotchaThe package has not been updated since December 2020. This means it may not support newer features of the Mixmax platform or gracefully handle recent changes to the Mixmax API. The official Mixmax API documentation continues to be updated, suggesting potential discrepancies.
fix
Review the official Mixmax Developer Portal and API documentation for any features or endpoints not covered by this library. Be prepared to directly use the Mixmax REST API for new functionalities or if this wrapper becomes incompatible with future Mixmax changes.
affects: >=1.5.0 (due to lack of further updates)
gotchaMixmax API requests are subject to rate limits (120 requests per minute per user and IP address). Exceeding these limits will result in errors.
fix
Implement proper error handling and retry mechanisms with exponential backoff for rate limit errors. Monitor your API usage and design your application to respect these limits, especially for bulk operations. Check the `Retry-After` header in error responses.
affects: >=1.0.0
gotchaAuthentication requires an API key, which must be obtained from your Mixmax settings page. Improper handling or exposure of this key can lead to unauthorized access to your Mixmax data.
fix
Always store your Mixmax API key securely, preferably using environment variables or a secret management service, especially in production environments. Never hardcode API keys directly into your source code. Regenerate the key if you suspect it has been compromised.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Request failed with status code 401
Invalid or missing Mixmax API key provided during client initialization. The API token might be incorrect, expired, or have insufficient permissions.
fix
Verify that your `MIXMAX_API_KEY` is correct and active. Ensure it's retrieved from your Mixmax settings (Settings > Integrations > API Token) and passed correctly to the `MixmaxAPI` constructor.
Error: Request failed with status code 404 - Sequence not found
The provided sequence ID does not exist, or the authenticated user does not have access to it.
fix
Double-check the `sequenceID` used in your code against your Mixmax dashboard. Ensure the API key corresponds to a Mixmax account that has permission to access that specific sequence.
Error: Request failed with status code 429 - Too Many Requests
Your application has exceeded the Mixmax API rate limits (120 requests per minute per user and IP address).
fix
Implement rate limiting on your client-side application or use a retry-with-backoff strategy to handle `429` responses. Respect the `Retry-After` header if provided in the API response.
TypeError: api.sequences.sequence is not a function
This error typically occurs if the `api` object was not correctly initialized with a `MixmaxAPI` instance, or if there's a typo in `sequences` or `sequence`. It could also indicate a fundamental change in the library's API if using an incompatible version.
fix
Ensure `const api = new MixmaxAPI(apiKey);` executed successfully and `apiKey` was valid. Verify the correct casing and property names (`sequences`, `sequence`). If updating, check the changelog for breaking changes related to the client's structure.
Upgrade
Version history
1.5.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
mixmax-api — npm install mixmax-api · libregistry