MarzbanSDK
Get Started

Installation

Install MarzbanSDK with npm, yarn, pnpm, bun, Deno, or a CDN, and run it in Node.js, Bun, Deno, the browser, and edge runtimes.

MarzbanSDK is published to npm and works in Node.js, Bun, Deno, browser, and edge runtimes (Cloudflare Workers, Vercel Edge, etc.).

Add to your project

npm install marzban-sdk

Requirements

RuntimeMinimum version
Node.js19+
Bun1.0+
Deno1.38+
BrowserAny modern browser (Chrome 90+, Firefox 90+, Safari 15+)

Node.js 19+ is required because the SDK uses the Web Crypto API (crypto.subtle) for webhook signature verification. Native WebSocket is available from Node.js 21+; older Node versions automatically fall back to the ws package (bundled as a regular dependency — installed automatically, no extra setup needed).

What's included

The package ships with:

  • ESM and CJS dual-format bundles — no configuration required.
  • Full TypeScript declarations (.d.ts) generated from the OpenAPI spec.
  • Tree-shakeable named exports — unused helpers are dropped by your bundler even though everything ships from a single entry point.

Next steps

On this page