Node.js SDK
The official HookBridge SDK for Node.js provides a simple, type-safe way to integrate with HookBridge.
Installation
Section titled “Installation”npm install @hookbridge/nodeQuick Start
Section titled “Quick Start”import { HookBridge } from '@hookbridge/sdk';
const client = new HookBridge({ apiKey: 'YOUR_API_KEY' });
// Create an endpointconst endpoint = await client.createEndpoint({ url: 'https://your-app.com/webhooks', description: 'My webhook endpoint'});
// Send a webhookconst result = await client.send({ endpointId: endpoint.id, payload: { event: 'user.created', data: { userId: '123', email: 'user@example.com' } }});
console.log(`Message sent: ${result.messageId}`);TypeScript Support
Section titled “TypeScript Support”The SDK includes full TypeScript definitions:
import { HookBridge } from '@hookbridge/sdk';
const client = new HookBridge({ apiKey: process.env.HOOKBRIDGE_API_KEY! });
const endpoint = await client.createEndpoint({ url: 'https://your-app.com/webhooks'});More Information
Section titled “More Information” Personalize Examples
Enter your credentials to populate code examples throughout the docs.