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

@smtpcom/smtpcom

v4.0.0

Published

SMTP.com API V4 client

Downloads

66

Readme

Tests codecov

SMTP.com API

JavaScript client for SMTP.com API V4

Installation

npm install smtpcom 

Getting Started

Please follow the installation instruction and execute the following JS code:

var SmtpComApi = require('@smtpcom/smtpcom');

var defaultClient = SmtpComApi.ApiClient.instance;
// Configure API key authorization: apiID
var apiID = defaultClient.authentications['apiID'];
apiID.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiID.apiKeyPrefix['api_key'] = "Token"
// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix['X-SMTPCOM-API'] = "Token"
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new SmtpComApi.APIKeysApi()
var apiKey = "apiKey_example"; // {String} API Key Identificator.
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAPIKey(apiKey, callback);

Documentation for API Endpoints

All URIs are relative to https://api.smtp.com

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- SmtpComApi.APIKeysApi | getAPIKey | GET /v4/api_keys/{api_key} | Get API Key Details SmtpComApi.APIKeysApi | v4ApiKeysApiKeyDelete | DELETE /v4/api_keys/{api_key} | Delete an API Key SmtpComApi.APIKeysApi | v4ApiKeysApiKeyPatch | PATCH /v4/api_keys/{api_key} | Update API Key SmtpComApi.APIKeysApi | v4ApiKeysGet | GET /v4/api_keys/ | List All API Keys SmtpComApi.APIKeysApi | v4ApiKeysPost | POST /v4/api_keys/ | Create a New API Key SmtpComApi.AccountApi | v4AccountContactPatch | PATCH /v4/account/contact | Update Account Details SmtpComApi.AccountApi | v4AccountGet | GET /v4/account/ | Get Account Details SmtpComApi.AlertsApi | v4AlertsAlertIdDelete | DELETE /v4/alerts/{alert_id} | Delete Alert SmtpComApi.AlertsApi | v4AlertsAlertIdGet | GET /v4/alerts/{alert_id} | Get Alert Details SmtpComApi.AlertsApi | v4AlertsAlertIdPatch | PATCH /v4/alerts/{alert_id} | Update Alert Details SmtpComApi.AlertsApi | v4AlertsGet | GET /v4/alerts/ | List All Allerts SmtpComApi.AlertsApi | v4AlertsPost | POST /v4/alerts/ | Create New Alert SmtpComApi.CallbacksApi | v4CallbacksDelete | DELETE /v4/callbacks/ | Delete All Callbacks SmtpComApi.CallbacksApi | v4CallbacksEventDelete | DELETE /v4/callbacks/{event} | Delete Callback SmtpComApi.CallbacksApi | v4CallbacksEventGet | GET /v4/callbacks/{event} | Get Callback Details SmtpComApi.CallbacksApi | v4CallbacksEventPatch | PATCH /v4/callbacks/{event} | Update Callback Details SmtpComApi.CallbacksApi | v4CallbacksEventPost | POST /v4/callbacks/{event} | Create Callback SmtpComApi.CallbacksApi | v4CallbacksGet | GET /v4/callbacks/ | List All Callbacks SmtpComApi.CallbacksApi | v4CallbacksLogGet | GET /v4/callbacks/log | View Callback Logs SmtpComApi.ChannelsApi | getSender | GET /v4/channels/{name} | Get Channel Details SmtpComApi.ChannelsApi | v4ChannelsGet | GET /v4/channels/ | Get All Channels SmtpComApi.ChannelsApi | v4ChannelsNameDelete | DELETE /v4/channels/{name} | Delete a Channel SmtpComApi.ChannelsApi | v4ChannelsNamePatch | PATCH /v4/channels/{name} | Update Channel Details SmtpComApi.ChannelsApi | v4ChannelsPost | POST /v4/channels/ | Create a New Channel SmtpComApi.DKIMsApi | v4DomainsDomainNameDelete | DELETE /v4/domains/{domain_name} | Delete Domain SmtpComApi.DKIMsApi | v4DomainsDomainNameDkimKeysDelete | DELETE /v4/domains/{domain_name}/dkim_keys | Delete DKIM for Domain SmtpComApi.DKIMsApi | v4DomainsDomainNameDkimKeysGet | GET /v4/domains/{domain_name}/dkim_keys | Get DKIM for Domain SmtpComApi.DKIMsApi | v4DomainsDomainNameDkimKeysPatch | PATCH /v4/domains/{domain_name}/dkim_keys | Update DKIM Key Details SmtpComApi.DKIMsApi | v4DomainsDomainNameDkimKeysPost | POST /v4/domains/{domain_name}/dkim_keys | Add DKIM for Domain SmtpComApi.DKIMsApi | v4DomainsDomainNameGet | GET /v4/domains/{domain_name} | Get Domain Details SmtpComApi.DKIMsApi | v4DomainsDomainNamePatch | PATCH /v4/domains/{domain_name} | Update Domain Details SmtpComApi.DKIMsApi | v4DomainsGet | GET /v4/domains/ | Get All Registered Domains SmtpComApi.DKIMsApi | v4DomainsPost | POST /v4/domains/ | Register a Domain SmtpComApi.MessagesApi | v4MessagesGet | GET /v4/messages | Get Detailed Messages Info SmtpComApi.MessagesApi | v4MessagesMimePost | POST /v4/messages/mime | Send MIME Message SmtpComApi.MessagesApi | v4MessagesPost | POST /v4/messages | Send a Message SmtpComApi.ReportsApi | v4ReportsGet | GET /v4/reports/ | Get All Reports SmtpComApi.ReportsApi | v4ReportsOndemandPost | POST /v4/reports/ondemand | Create On-Demand Report SmtpComApi.ReportsApi | v4ReportsPeriodicPost | POST /v4/reports/periodic | Create Periodic Report SmtpComApi.ReportsApi | v4ReportsPeriodicReportIdDelete | DELETE /v4/reports/periodic/{report_id} | Delete a Periodic Report SmtpComApi.ReportsApi | v4ReportsPeriodicReportIdPatch | PATCH /v4/reports/periodic/{report_id} | Update Periodic Report SmtpComApi.ReportsApi | v4ReportsReportIdGet | GET /v4/reports/{report_id} | Get Report Details SmtpComApi.StatisticsApi | v4StatsDurationSliceSliceSpecifierGroupByGet | GET /v4/stats/{duration}/{slice}/{slice_specifier}/{group_by} | Return event aggregates for the specified slices and duration. Slices can be chained.

Documentation for Models

Documentation for Authorization

apiID

  • Type: API key
  • API key parameter name: api_key
  • Location: URL query string

apiKey

  • Type: API key
  • API key parameter name: X-SMTPCOM-API
  • Location: HTTP header

basicAuth

  • Type: HTTP basic authentication