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

@trycourier/courier-js

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trycourier/courier-js

[![Courier: Your Complete Communication Stack](https://www.courier.com/_next/image/?url=https%3A%2F%2Fimages.ctfassets.net%2Fz7iqk1q8njt4%2F1PZo9WNTdmoDoYH3yulXa0%2Fb10830f7bfb09af5e644a39ac3d20c41%2FCourierJS_header_alt2.png&w=1920&q=75)](https://courier

  • 1.4.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Courier: Your Complete Communication Stack

Overview

SDK used by client applications to interface with the Courier API.  

Requirements
Courier Account Sign Up
Client API Key Get key

Supported Interfaces

FeatureDescription
Identify Event that triggers a user Create or Update within Courier Profiles.
Track Event ingested by Courier can be used to trigger an automation or supply inline payloads within an existing automation workflow.
GeneratePreferencesUrl Generates URL that can be used to link users to Preferences Center to manage their notification preferences.

Installation

# npm
npm install @trycourier/courier-js
# yarn
yarn add @trycourier/courier-js
# pnpm
pnpm add @trycourier/courier-js

Usage

Initializing Client

import courier from "@trycourier/courier-js";

courier.init({
  clientKey: "<REPLACE_WITH_YOUR_CLIENT_KEY>",
  debug: true, // debug enables client side logs for error catching
});

Identify

await courierSDK.identify("purbleUserId", {
      email: "customer@purbleplace.com",
      favoriteColor: "purple",
});

Track

Basic

await courierSDK.track("user-signup");

With data payload

await courierSDK.track("bake-cake", { 
    cakeFlavor: "carrot", 
    frosting: "cream cheese"
});

GeneratePreferencesUrl

const prefCenterLink = courier.generatePreferencesUrl("<user-id>", {
  // optional
  brandId: "<brand-id>",
});

Share feedback with Courier

We are building the best SDKs for handling notifications! Have an idea or feedback about our SDKs? Here are some links to contact us:

FAQs

Package last updated on 10 May 2024

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