Pingram Node SDK (Server-side)

A fully-typed TypeScript SDK for Pingram (formerly NotificationAPI).
Installation
Production (latest stable)
npm install pingram
Usage
Basic Setup
Import and initialize the client:
import { Pingram } from 'pingram';
// Server-side: Secret Key (Bearer token)
const apiClient = new Pingram({
apiKey: 'pingram_sk_...'
});
For connecting to Canada or EU regions, set the region option:
const apiClient = new Pingram({
apiKey: 'pingram_sk_...',
region: 'eu'
});
Send
await apiClient.send({
type: 'otp',
to: {
id: 'user123',
email: 'user@example.com',
number: '+15005550006'
},
email: {
subject: 'Hello',
html: '<h1>Hello, world!</h1>'
},
sms: {
message: 'Hello, world!'
}
});
License
MIT
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting a pull request.