Skip to main content

Node.js SDK

Official SDK for Node.js, Deno, Bun, and edge runtimes.

Installation

npm install @midbound/cloud

Webhooks

Verify and parse webhook events with full type safety:
import MidboundCloud from "@midbound/cloud";

const midbound = new MidboundCloud();

// Verify signature and parse event
const event = midbound.webhooks.unwrap(
  req.body.toString(),
  {
    headers: req.headers,
    key: process.env.MIDBOUND_WEBHOOK_SECRET,
  }
);

// Handle typed events
switch (event.type) {
  case "identity.enriched":
    const person = event.data.enrichment?.person;
    console.log(person?.fullName, person?.linkedinUrl);
    break;
}

Webhook Example

Full working example with Express and Firestore

API Usage

See the API Reference for all available methods with auto-generated examples.

Source