Node.js SDK v2
A thin, typed wrapper around the v2 REST API for Node.js and TypeScript projects.
Install
terminal
bash
npm install @kmp/sdk
Create a client
client.ts
typescript
import { KMP } from "@kmp/sdk";
const kmp = new KMP({ apiKey: process.env.KMP_API_KEY });
Create a pipeline
Maps directly onto the Pipelines endpoint — see the Building your first pipeline guide for the concepts.
create-pipeline.ts
typescript
const pipeline = await kmp.pipelines.create({
name: "ingest-orders",
sourceConnectorId: "conn_pg_orders",
destinationConnectorId: "conn_snowflake_dw",
});
Listening for webhooks
The SDK includes a signature-verification helper for webhook payloads:
verify.ts
typescript
import { verifyWebhookSignature } from "@kmp/sdk";
const isValid = verifyWebhookSignature(rawBody, signatureHeader, webhookSecret);
Retries are built in
The SDK retries idempotent requests (GET, and POST with an Idempotency-Key) automatically on 429 and 5xx responses using the same backoff the API itself uses.