Developer & Agent API Portal
Public REST Endpoint Reference
Complete reference and multi-language code examples (JavaScript, TypeScript, Python, cURL) for verified public endpoints.
Verified Public REST Endpoints
| Method & Path | Response Fields | Description |
|---|---|---|
GET /api/v1/health | success, status, uptime, discordConnected, databaseConnected, shards | Service health check for Discord gateway connection and database. |
GET /api/v1/stats | success, servers, users, pingMs, uptimeSeconds | Live aggregate guild, member, latency, and uptime counters. |
GET /api/stats | online, status, ping, servers, users, commands, services[], shards[] | Full status telemetry including active subsystems, Node version, and per-shard load. |
GET /api/v1/bot-info | success, name, avatar, inviteUrl, supportServer, verified, merchant | Canonical bot profile metadata and invite URLs. |
GET /api/v1/tools | success, tools[] | Structured JSON tool definitions compatible with LLM function calling. |
GET /api/v1/pricing | success, currency, plans[] | Active tier definitions (Free, Starter, Pro monthly/yearly) and server slot caps. |
GET /api/ping | ok, timestamp | Ultra-lightweight JSON heartbeat check. |
Multi-Language SDK / Client Examples
bash
Fetch live gateway & service health telemetry
curl -sS "https://panel.fusionhub.in/api/v1/health" \
-H "Accept: application/json"
javascript
Standard Fetch API with timeout
const res = await fetch('https://panel.fusionhub.in/api/stats', {
headers: { Accept: 'application/json' },
signal: AbortSignal.timeout(4000)
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const stats = await res.json();
console.log(stats.online, stats.ping, stats.servers);
typescript
Typed response reader
interface HealthResponse {
success: boolean;
status: string;
uptime: number;
discordConnected: boolean;
databaseConnected: boolean;
}
async function checkFusionHealth(): Promise<HealthResponse> {
const res = await fetch('https://panel.fusionhub.in/api/v1/health');
if (!res.ok) throw new Error(`Health probe failed: ${res.status}`);
return res.json() as Promise<HealthResponse>;
}
python
Using requests with timeout
import requests
resp = requests.get(
"https://panel.fusionhub.in/api/v1/pricing",
headers={"Accept": "application/json"},
timeout=5,
)
resp.raise_for_status()
print(resp.json()["plans"])