Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@elasticemail/elasticemail-client

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elasticemail/elasticemail-client

Official ElasticEmail SDK. This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach.

  • 4.0.23
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@elasticemail/elasticemail-client

ElasticEmail - JavaScript client for @elasticemail/elasticemail-client This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach.

Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used.

The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request.

To start using this API, you will need your Access Token (available here). Remember to keep it safe. Required access levels are listed in the given request’s description.

Downloadable library clients can be found in our Github repository here This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 4.0.0
  • Package version: 4.0.23
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install @elasticemail/elasticemail-client --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your @elasticemail/elasticemail-client from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build
git

If the library is hosted at a git repository, e.g.https://github.com/elasticemail/elasticemail-js then install it via:

    npm install elasticemail/elasticemail-js --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

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

var ElasticEmail = require('@elasticemail/elasticemail-client');

var defaultClient = ElasticEmail.ApiClient.instance;
// 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-ElasticEmail-ApiKey'] = "Token"

var api = new ElasticEmail.CampaignsApi()
var name = "name_example"; // {String} Name of Campaign to delete
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.campaignsByNameDelete(name, callback);

Examples

Function
addCampaignreadme
addContactsreadme
addListreadme
addTemplatereadme
deleteCampaignreadme
deleteContactreadme
deleteListreadme
deleteTemplatereadme
exportContactsreadme
loadCampaignreadme
loadCampaignsStatsreadme
loadChannelsStatsreadme
loadListreadme
loadStatisticsreadme
loadTemplatereadme
sendBulkEmailsreadme
sendTransactionalEmailsreadme
updateCampaignreadme
uploadContactsreadme

Documentation for API Endpoints

All URIs are relative to https://api.elasticemail.com/v4

ClassMethodHTTP requestDescription
ElasticEmail.CampaignsApicampaignsByNameDeleteDELETE /campaigns/{name}Delete Campaign
ElasticEmail.CampaignsApicampaignsByNameGetGET /campaigns/{name}Load Campaign
ElasticEmail.CampaignsApicampaignsByNamePutPUT /campaigns/{name}Update Campaign
ElasticEmail.CampaignsApicampaignsGetGET /campaignsLoad Campaigns
ElasticEmail.CampaignsApicampaignsPostPOST /campaignsAdd Campaign
ElasticEmail.ContactsApicontactsByEmailDeleteDELETE /contacts/{email}Delete Contact
ElasticEmail.ContactsApicontactsByEmailGetGET /contacts/{email}Load Contact
ElasticEmail.ContactsApicontactsByEmailPutPUT /contacts/{email}Update Contact
ElasticEmail.ContactsApicontactsDeletePostPOST /contacts/deleteDelete Contacts Bulk
ElasticEmail.ContactsApicontactsExportByIdStatusGetGET /contacts/export/{id}/statusCheck Export Status
ElasticEmail.ContactsApicontactsExportPostPOST /contacts/exportExport Contacts
ElasticEmail.ContactsApicontactsGetGET /contactsLoad Contacts
ElasticEmail.ContactsApicontactsImportPostPOST /contacts/importUpload Contacts
ElasticEmail.ContactsApicontactsPostPOST /contactsAdd Contact
ElasticEmail.EmailsApiemailsByMsgidViewGetGET /emails/{msgid}/viewView Email
ElasticEmail.EmailsApiemailsMergefilePostPOST /emails/mergefileSend Bulk Emails CSV
ElasticEmail.EmailsApiemailsPostPOST /emailsSend Bulk Emails
ElasticEmail.EmailsApiemailsTransactionalPostPOST /emails/transactionalSend Transactional Email
ElasticEmail.EventsApieventsByTransactionidGetGET /events/{transactionid}Load Email Events
ElasticEmail.EventsApieventsChannelsByNameExportPostPOST /events/channels/{name}/exportExport Channel Events
ElasticEmail.EventsApieventsChannelsByNameGetGET /events/channels/{name}Load Channel Events
ElasticEmail.EventsApieventsChannelsExportByIdStatusGetGET /events/channels/export/{id}/statusCheck Channel Export Status
ElasticEmail.EventsApieventsExportByIdStatusGetGET /events/export/{id}/statusCheck Export Status
ElasticEmail.EventsApieventsExportPostPOST /events/exportExport Events
ElasticEmail.EventsApieventsGetGET /eventsLoad Events
ElasticEmail.FilesApifilesByNameDeleteDELETE /files/{name}Delete File
ElasticEmail.FilesApifilesByNameGetGET /files/{name}Download File
ElasticEmail.FilesApifilesByNameInfoGetGET /files/{name}/infoLoad File Details
ElasticEmail.FilesApifilesGetGET /filesList Files
ElasticEmail.FilesApifilesPostPOST /filesUpload File
ElasticEmail.InboundRouteApiinboundrouteByIdDeleteDELETE /inboundroute/{id}Delete Route
ElasticEmail.InboundRouteApiinboundrouteByIdGetGET /inboundroute/{id}Get Route
ElasticEmail.InboundRouteApiinboundrouteByIdPutPUT /inboundroute/{id}Update Route
ElasticEmail.InboundRouteApiinboundrouteGetGET /inboundrouteGet Routes
ElasticEmail.InboundRouteApiinboundrouteOrderPutPUT /inboundroute/orderUpdate Sorting
ElasticEmail.InboundRouteApiinboundroutePostPOST /inboundrouteCreate Route
ElasticEmail.ListsApilistsByNameContactsPostPOST /lists/{name}/contactsAdd Contacts to List
ElasticEmail.ListsApilistsByNameContactsRemovePostPOST /lists/{name}/contacts/removeRemove Contacts from List
ElasticEmail.ListsApilistsByNameDeleteDELETE /lists/{name}Delete List
ElasticEmail.ListsApilistsByNameGetGET /lists/{name}Load List
ElasticEmail.ListsApilistsByNamePutPUT /lists/{name}Update List
ElasticEmail.ListsApilistsGetGET /listsLoad Lists
ElasticEmail.ListsApilistsPostPOST /listsAdd List
ElasticEmail.SecurityApisecurityApikeysByNameDeleteDELETE /security/apikeys/{name}Delete ApiKey
ElasticEmail.SecurityApisecurityApikeysByNameGetGET /security/apikeys/{name}Load ApiKey
ElasticEmail.SecurityApisecurityApikeysByNamePutPUT /security/apikeys/{name}Update ApiKey
ElasticEmail.SecurityApisecurityApikeysGetGET /security/apikeysList ApiKeys
ElasticEmail.SecurityApisecurityApikeysPostPOST /security/apikeysAdd ApiKey
ElasticEmail.SecurityApisecuritySmtpByNameDeleteDELETE /security/smtp/{name}Delete SMTP Credential
ElasticEmail.SecurityApisecuritySmtpByNameGetGET /security/smtp/{name}Load SMTP Credential
ElasticEmail.SecurityApisecuritySmtpByNamePutPUT /security/smtp/{name}Update SMTP Credential
ElasticEmail.SecurityApisecuritySmtpGetGET /security/smtpList SMTP Credentials
ElasticEmail.SecurityApisecuritySmtpPostPOST /security/smtpAdd SMTP Credential
ElasticEmail.SegmentsApisegmentsByNameDeleteDELETE /segments/{name}Delete Segment
ElasticEmail.SegmentsApisegmentsByNameGetGET /segments/{name}Load Segment
ElasticEmail.SegmentsApisegmentsByNamePutPUT /segments/{name}Update Segment
ElasticEmail.SegmentsApisegmentsGetGET /segmentsLoad Segments
ElasticEmail.SegmentsApisegmentsPostPOST /segmentsAdd Segment
ElasticEmail.StatisticsApistatisticsCampaignsByNameGetGET /statistics/campaigns/{name}Load Campaign Stats
ElasticEmail.StatisticsApistatisticsCampaignsGetGET /statistics/campaignsLoad Campaigns Stats
ElasticEmail.StatisticsApistatisticsChannelsByNameGetGET /statistics/channels/{name}Load Channel Stats
ElasticEmail.StatisticsApistatisticsChannelsGetGET /statistics/channelsLoad Channels Stats
ElasticEmail.StatisticsApistatisticsGetGET /statisticsLoad Statistics
ElasticEmail.SubAccountsApisubaccountsByEmailCreditsPatchPATCH /subaccounts/{email}/creditsAdd, Subtract Email Credits
ElasticEmail.SubAccountsApisubaccountsByEmailDeleteDELETE /subaccounts/{email}Delete SubAccount
ElasticEmail.SubAccountsApisubaccountsByEmailGetGET /subaccounts/{email}Load SubAccount
ElasticEmail.SubAccountsApisubaccountsByEmailSettingsEmailPutPUT /subaccounts/{email}/settings/emailUpdate SubAccount Email Settings
ElasticEmail.SubAccountsApisubaccountsGetGET /subaccountsLoad SubAccounts
ElasticEmail.SubAccountsApisubaccountsPostPOST /subaccountsAdd SubAccount
ElasticEmail.SuppressionsApisuppressionsBouncesGetGET /suppressions/bouncesGet Bounce List
ElasticEmail.SuppressionsApisuppressionsBouncesImportPostPOST /suppressions/bounces/importAdd Bounces Async
ElasticEmail.SuppressionsApisuppressionsBouncesPostPOST /suppressions/bouncesAdd Bounces
ElasticEmail.SuppressionsApisuppressionsByEmailDeleteDELETE /suppressions/{email}Delete Suppression
ElasticEmail.SuppressionsApisuppressionsByEmailGetGET /suppressions/{email}Get Suppression
ElasticEmail.SuppressionsApisuppressionsComplaintsGetGET /suppressions/complaintsGet Complaints List
ElasticEmail.SuppressionsApisuppressionsComplaintsImportPostPOST /suppressions/complaints/importAdd Complaints Async
ElasticEmail.SuppressionsApisuppressionsComplaintsPostPOST /suppressions/complaintsAdd Complaints
ElasticEmail.SuppressionsApisuppressionsGetGET /suppressionsGet Suppressions
ElasticEmail.SuppressionsApisuppressionsUnsubscribesGetGET /suppressions/unsubscribesGet Unsubscribes List
ElasticEmail.SuppressionsApisuppressionsUnsubscribesImportPostPOST /suppressions/unsubscribes/importAdd Unsubscribes Async
ElasticEmail.SuppressionsApisuppressionsUnsubscribesPostPOST /suppressions/unsubscribesAdd Unsubscribes
ElasticEmail.TemplatesApitemplatesByNameDeleteDELETE /templates/{name}Delete Template
ElasticEmail.TemplatesApitemplatesByNameGetGET /templates/{name}Load Template
ElasticEmail.TemplatesApitemplatesByNamePutPUT /templates/{name}Update Template
ElasticEmail.TemplatesApitemplatesGetGET /templatesLoad Templates
ElasticEmail.TemplatesApitemplatesPostPOST /templatesAdd Template
ElasticEmail.VerificationsApiverificationsByEmailDeleteDELETE /verifications/{email}Delete Email Verification Result
ElasticEmail.VerificationsApiverificationsByEmailGetGET /verifications/{email}Get Email Verification Result
ElasticEmail.VerificationsApiverificationsByEmailPostPOST /verifications/{email}Verify Email
ElasticEmail.VerificationsApiverificationsFilesByIdDeleteDELETE /verifications/files/{id}Delete File Verification Result
ElasticEmail.VerificationsApiverificationsFilesByIdResultDownloadGetGET /verifications/files/{id}/result/downloadDownload File Verification Result
ElasticEmail.VerificationsApiverificationsFilesByIdResultGetGET /verifications/files/{id}/resultGet Detailed File Verification Result
ElasticEmail.VerificationsApiverificationsFilesByIdVerificationPostPOST /verifications/files/{id}/verificationStart verification
ElasticEmail.VerificationsApiverificationsFilesPostPOST /verifications/filesUpload File with Emails
ElasticEmail.VerificationsApiverificationsFilesResultGetGET /verifications/files/resultGet Files Verification Results
ElasticEmail.VerificationsApiverificationsGetGET /verificationsGet Emails Verification Results

Documentation for Models

Documentation for Authorization

apikey

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

Keywords

FAQs

Package last updated on 10 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc