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
yarn add marzban-sdk
pnpm add marzban-sdk
bun add marzban-sdk
deno add npm:marzban-sdk
import { createMarzbanSDK } from 'https://esm.sh/marzban-sdk'

No build step — import straight from esm.sh in the browser or Deno.

Requirements

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

Node.js 18+ 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 an optional peer dependency).

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 helpers and utilities in separate export paths.

Next steps

On this page