Skip to content

Node.js SDK

The official HookBridge SDK for Node.js provides a simple, type-safe way to integrate with HookBridge.

Terminal window
npm install @hookbridge/node
import { HookBridge } from '@hookbridge/sdk';
const client = new HookBridge({ apiKey: 'YOUR_API_KEY' });
// Create an endpoint
const endpoint = await client.createEndpoint({
url: 'https://your-app.com/webhooks',
description: 'My webhook endpoint'
});
// Send a webhook
const result = await client.send({
endpointId: endpoint.id,
payload: {
event: 'user.created',
data: { userId: '123', email: 'user@example.com' }
}
});
console.log(`Message sent: ${result.messageId}`);

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'
});
Personalize Examples

Enter your credentials to populate code examples throughout the docs.