Getting Started

Quickstart

Get up and running with MUDBASE in under 5 minutes.

1
Install the SDK
Add the MUDBASE SDK to your project using your package manager.
2
Initialize the client
Create a client instance with your API key and project ID.
3
Make your first request
Call any SDK method to interact with the MUDBASE platform.

Install the SDK

bashterminal
npm install mudbase-sdk
npm install mudbase-sdk

Initialize the Client

javascriptmudbase.js
import { MudbaseClient } from "mudbase-sdk";

const mudbase = new MudbaseClient({
  apiKey: process.env.MUDBASE_API_KEY,
  projectId: process.env.MUDBASE_PROJECT_ID,
  orgId: process.env.MUDBASE_ORG_ID, // optional
});

export default mudbase;
import { MudbaseClient } from "mudbase-sdk";

const mudbase = new MudbaseClient({
  apiKey: process.env.MUDBASE_API_KEY,
  projectId: process.env.MUDBASE_PROJECT_ID,
  orgId: process.env.MUDBASE_ORG_ID, // optional
});

export default mudbase;

First Request

javascriptexample.js
// Check system health
const health = await mudbase.health.check();
console.log(health.status); // 'ok'

// Get real-time analytics
const analytics = await mudbase.analytics.getProjectAnalytics({
  projectId: "proj_xxxxxxxx",
});
console.log(analytics.activeUsers);
// Check system health
const health = await mudbase.health.check();
console.log(health.status); // 'ok'

// Get real-time analytics
const analytics = await mudbase.analytics.getProjectAnalytics({
  projectId: "proj_xxxxxxxx",
});
console.log(analytics.activeUsers);

Environment Variables

bash.env
MUDBASE_API_KEY=mb_live_xxxxxxxxxxxxxxxxxxxxxxxx
MUDBASE_PROJECT_ID=proj_xxxxxxxxxxxxxxxx
MUDBASE_ORG_ID=org_xxxxxxxxxxxxxxxx
MUDBASE_API_KEY=mb_live_xxxxxxxxxxxxxxxxxxxxxxxx
MUDBASE_PROJECT_ID=proj_xxxxxxxxxxxxxxxx
MUDBASE_ORG_ID=org_xxxxxxxxxxxxxxxx
Note
Find your projectId and API key in the MUDBASE Console under Settings → API Keys.
Warning
Never expose your API key in client-side code. Always use environment variables or a secrets manager.

Last updated: April 2026

Edit this page on GitHub