🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@trycourier/courier

Package Overview
Dependencies
Maintainers
4
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trycourier/courier

The official TypeScript library for the Courier API

latest
Source
npmnpm
Version
7.10.2
Version published
Weekly downloads
68K
-19.81%
Maintainers
4
Weekly downloads
 
Created
Source

Courier Node.js SDK

The Courier Node.js SDK provides typed access to the Courier REST API from server-side TypeScript or JavaScript. Use it to send notifications, manage user profiles, check message status, issue JWT tokens for client-side SDKs, and more.

Installation

npm install @trycourier/courier

Also available via yarn add @trycourier/courier and pnpm add @trycourier/courier.

Requires Node.js 20+ (LTS). Also works in Deno 1.28+, Bun 1.0+, Cloudflare Workers, and Vercel Edge Runtime.

Quick Start

import Courier from '@trycourier/courier';

const client = new Courier();

const response = await client.send.message({
  message: {
    to: { email: 'you@example.com' },
    content: {
      title: 'Hello from Courier!',
      body: 'Your first notification, sent with the Node.js SDK.',
    },
  },
});

console.log(response.requestId);

The client reads COURIER_API_KEY from your environment automatically. You can also pass it explicitly: new Courier({ apiKey: 'your-key' }).

Common Operations

// Check message delivery status
const message = await client.messages.retrieve('message-id');
console.log(message.status);

// Create or update a user profile
await client.profiles.create('user_123', {
  profile: { email: 'jane@example.com', name: 'Jane Doe' },
});

// Issue a JWT for client-side SDK auth
const { token } = await client.auth.issueToken({
  scope: 'user_id:user_123 inbox:read:messages inbox:write:events',
  expires_in: '2 days',
});

Documentation

Full documentation: courier.com/docs/sdk-libraries/node

FAQs

Package last updated on 14 Apr 2026

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