npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sendmux/management

v2.0.2

Published

[![npm version](https://img.shields.io/npm/v/@sendmux%2Fmanagement)](https://www.npmjs.com/package/@sendmux/management) [![CI](https://github.com/Sendmux/sendmux-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/Sendmux/sendmux-sdk/actions/workf

Readme

@sendmux/management

npm version CI npm downloads Licence

Generated TypeScript client for the Sendmux Management API.

Documentation

Requirements

  • A root Sendmux API key with the smx_root_* prefix; alternatively, a REST OAuth grant for this surface.
  • A JavaScript runtime with the standard Fetch API.

Installation

npm install @sendmux/management

Migrate from 1.x to 2.0

If you pass sending-account list entries to code that expects a detail result, update those types before upgrading to 2.0. managementListProviders returns ProviderListItem entries without variables; managementGetProvider returns a ProviderItem with required variables. A list entry no longer satisfies the detail type.

  1. Derive separate list and detail types from the public operations. The package doesn't export these generated model names directly:

    import {
      managementGetProvider,
      managementListProviders,
    } from "@sendmux/management";
    
    type ProviderListItem = NonNullable<
      Awaited<ReturnType<typeof managementListProviders>>["data"]
    >["data"][number];
    type ProviderItem = NonNullable<
      Awaited<ReturnType<typeof managementGetProvider>>["data"]
    >["data"];
  2. For code that only needs list fields, replace the detail annotation with the list type:

    // Before: type ProviderRow = ProviderItem;
    type ProviderRow = ProviderListItem;

    If you need variables, fetch the detail with managementGetProvider using the account's id as path.public_id. Don't cast a list entry to ProviderItem or add an empty variables object to stand in for the account's actual variables.

  3. Run your application's TypeScript check. List-only code should accept ProviderListItem; code that reads variables must receive a detail result.

OAuth access tokens

Pass accessToken instead of apiKey for a REST OAuth token or synchronous/asynchronous provider.

import { createManagementClient } from "@sendmux/management";

const client = createManagementClient({
  accessToken: () => process.env.SENDMUX_ACCESS_TOKEN!,
});

The provider runs before each request. Your application owns token storage and refresh; required scopes still apply. See OAuth setup.

Usage

import {
  createManagementClient,
  managementListDomains,
} from "@sendmux/management";

const client = createManagementClient({
  apiKey: process.env.SENDMUX_API_KEY!,
});

const domains = await managementListDomains({ client });

console.log(domains.data);

The package exports every generated Management operation plus:

  • createManagementClient
  • configureManagement
  • ManagementClient

Conditional requests

Use conditionalHeaders from @sendmux/core for operations that accept If-Match or If-None-Match.

import { conditionalHeaders } from "@sendmux/core";
import {
  createManagementClient,
  managementGetDomain,
} from "@sendmux/management";

const client = createManagementClient({
  apiKey: process.env.SENDMUX_API_KEY!,
});

const domain = await managementGetDomain({
  client,
  path: { public_id: "mdom_123" },
  headers: { ...conditionalHeaders({ ifNoneMatch: 'W/"etag"' }) },
});

console.log(domain.data);

Support

Open an issue in Sendmux/sendmux-sdk with the package name, version, and request ID from any API error.

Licence

MIT. See the licence file.