What is the Plugin API?
The Plugin API is the server-to-server API of your LeaderOS website. The official LeaderOS plugins (Minecraft, Hytale, FiveM, Rust, ARK, Unturned, Garry’s Mod, CS2) and the Discord bot talk to your site through it. You can use it too, to write your own plugin, bot or backend integration.In-game login and registration
Authenticate players in game with their website account, register them, check 2FA codes.
Store and credits
In-game store menus, buying with credits, adding/removing/sending credits.
Command delivery
Run the commands of purchased products on your game server with LeaderOS Connect.
Discord and support
Discord role syncing, support tickets, AI commands.
Plugin API vs Headless API
Basics
- Base URL:
https://your-site.com/api - Authentication: the
X-Api-Key: <api key>header on every request - Request body:
application/x-www-form-urlencoded(ormultipart/form-data). JSON bodies are not validated; send form data. - Arrays: sent as form arrays, e.g.
commands[]=15&commands[]=16,products[0][id]=12&products[0][quantity]=1
Response format
Endpoints that perform an action return this envelope:error is VALIDATION and message is a list of messages:
Some read endpoints (e.g.
GET /store/products, GET /users, GET /credits) return the object or array directly, without the envelope. The API reference shows the response shape of every endpoint.error code, not on message.
HTTP status codes
Endpoints
See the API reference group on the left for every parameter and response.
Where to start
1
Enable the API
Turn on the API in the panel and get your key → Setup
2
Write your own integration
Start with the sample requests → Usage examples
