Reference
API Overview
The Struxa panel exposes a type-safe oRPC API. This page covers authentication, endpoints, and usage.
The Struxa panel uses oRPC — a type-safe RPC layer over HTTP POST. All procedures live under /rpc.
Authentication
The API uses API keys via Better Auth's API key plugin. Generate one from your account settings in the panel under Account → API Keys.
Pass the key in every request:
Authorization: Bearer YOUR_API_KEYBase URL
https://panel.example.com/rpcCalling Procedures
Each procedure is called via HTTP POST with a JSON body:
curl -X POST https://panel.example.com/rpc/servers.list \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Procedure Namespaces
| Namespace | Access | Description |
|---|---|---|
servers.* | User / Admin | List, get, power-control, and manage game servers |
nodes.* | Admin | Register and manage Wings nodes and allocations |
eggs.* | User / Admin | List and manage game server templates |
nests.* | Admin | Manage nest groups for eggs |
users.* | Admin | Manage panel users |
subusers.* | User | Grant server access to other users |
backups.* | User | Create, restore, and delete server backups |
databases.* | User / Admin | Manage server databases and database hosts |
schedules.* | User | Manage automated task schedules |
files.* | User | Browse and manage server files |
activity.* | User / Admin | View audit logs |
settings.* | User | Update server settings |
locations.* | Admin | Manage node locations |
Access Levels
- User — Requires a valid session or API key. Servers are scoped to the authenticated user.
- Admin — Requires the
adminrole. Full access to all resources across all users.
TypeScript Client
The API is fully typed via oRPC and Zod. A type-safe client can be generated for TypeScript:
import { createORPCClient } from '@orpc/client';
const client = createORPCClient({
baseUrl: 'https://panel.example.com/rpc',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const servers = await client.servers.list({});