Guides

Examples

Copy-paste snippets for common tasks. Replace the base URL and API key with your server's values.

All examples assume a base URL of https://mc.example.com and that the key header is required.

Broadcast a message

Send an announcement to every online player.

curl
curl -X POST https://mc.example.com/v1/chat/broadcast \
  -H "key: YOUR_API_KEY" \
  -d "message=Server restarting in 5 minutes"

Teleport a player

Move a player to specific coordinates in a world. Players are addressed by UUID.

curl
curl -X POST https://mc.example.com/v1/players/069a79f4-44e9-4726-a5be-fca90e38aaf5/teleport \
  -H "key: YOUR_API_KEY" \
  -d "x=128" -d "y=64" -d "z=-220" -d "world=world"

Check a balance

Read a player's economy balance (requires a Vault-compatible economy plugin).

curl
curl https://mc.example.com/v1/economy/balance/069a79f4-44e9-4726-a5be-fca90e38aaf5 \
  -H "key: YOUR_API_KEY"

Check a permission

Resolve whether a player has a permission, accounting for inheritance and wildcards (requires LuckPerms).

curl
curl -X POST https://mc.example.com/v1/luckperms/player/069a79f4-44e9-4726-a5be-fca90e38aaf5/check-permission \
  -H "key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"permission": "essentials.fly"}'