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

unisender-node

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unisender-node

Unisender SDK (TypeScript)

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Unisender SDK

πŸ’₯ Work in progress!

API documentation

  • ДокумСнтация API Π½Π° русском

  • English API docs

Usage example

Installation

yarn add unisender-node

or

npm i unisender-node

Basic usage

import Unisender from 'unisender-node'


const sdk = new Unisender({ apiKey: 'my-secret-key', lang: 'en' })

// Getting lists
const lists = sdk.getLists()

All responses are typed and mirroring Unisender API responses

Using environment variables

SDK will check for these ENV variables:

  • UNISENDER_API_KEY
  • UNISENDER_LANG

If you provide these variables, you don't need to provide in constructor.

import Unisender from 'unisender-node'

const sdk = new Unisender()

Examples

Import contacts


// Two ways to pass data
// 1. Unisender way - CSV-style array of arrays with field_names
const result = await sdk.importContacts({
    field_names: ['email', 'Name'],
    data: [
      ['test1@example.com', 'Test name'],
      ['test2@example.com', 'Test name2']
    ]
  })
// 2. Simple object
const result = await sdk.importContacts({
  data: [
    { email: 'test1@example.com', Name: 'Test name' },
    { email: 'test2@example.com', Name: 'Test2 name' },
  ]
})

Implementation progress

Contacts

MethodStatus
getListsβœ…
createListβœ…
updateListβœ…
deleteListβœ…
subscribeβœ…
unsubscribeβœ…
excludeβœ…
importContactsβœ…
importContactsBatch *βœ…
exportContactsβœ…
getTaskResultβœ…
getContactβœ…
getContactCountβœ…
getTotalContactsCountβœ…
isContactInListsβœ…
  • importContactsBatch - simple helper will divide importContacts in chunks with 500 items. Will return array of results of importContacts

Messaging

MethodStatus
createEmailMessageβœ…
updateEmailMessageβœ…
deleteMessageβœ…
getActualMessageVersionβœ…
sendTestEmailβœ…
sendEmailβœ…
checkEmailβœ…
createSmsMessageβœ…
sendSmsβœ…
checkSmsβœ…
createCampaignβœ…
cancelCampaignβœ…
getWebVersionβœ…
updateOptInEmailβœ…
getSenderDomainListβœ…

Statistics

MethodStatus
getCampaignCommonStatsβœ…
getCampaignDeliveryStatsβœ…
getCampaignStatusβœ…
getMessagesβœ…
getVisitedLinksβœ…
listMessages🚧
getCampaigns🚧
getMessage🚧

Templates

MethodStatus
createEmailTemplate🚧
deleteTemplate🚧
getTemplate🚧
getTemplates🚧
listTemplates🚧
updateEmailTemplate🚧

Fields

MethodStatus
createFieldβœ…
deleteFieldβœ…
deleteTagβœ…
getFieldsβœ…
getTagsβœ…
updateFieldβœ…
getContactFieldValuesβœ…

FAQs

Package last updated on 21 Jan 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