JavaScript and TypeScript Alerts SDK
The API Alerts JavaScript SDK sends alerts from your JavaScript or TypeScript code through API Alerts. Drop it into Node.js, React, Next.js, Bun, or any JavaScript runtime that needs to notify you when something important happens. Minimal setup, fire-and-forget by default with optional response handling, and zero infrastructure.
Installation
npm install apialerts-js
Usage
import { ApiAlerts } from 'apialerts-js';
const client = new ApiAlerts('YOUR-API-KEY');
// Simple notification
await client.send({ message: 'Deployment successful' });
// With all options
await client.send({
message: 'New user signed up',
channel: 'developers',
link: 'https://dashboard.example.com/users/123',
tags: ['signup', 'organic'],
});