Skip to content

API overview ​

Everything the interface does goes through the same HTTP API, so anything you can click, a script can do.

  • Base address: https://panel.example.com/api
  • Format: JSON in and out
  • Description: OpenAPI 3.1. A running panel serves it at /api/openapi.json, with browsable docs at /api/docs, to signed-in users and API keys only (everyone else gets 404). The same file is in the repository as web/openapi.json

Authentication ​

Create an API key under Account → API keys. You need your password (and a two-factor code if it is on). The key, which starts with gp_, is shown once; the panel keeps only a hash of it.

sh
curl -H "Authorization: Bearer gp_..." https://panel.example.com/api/servers
  • A key acts as your account, with everything your account may do. There are no scopes yet, so make a separate account for an integration that needs less.
  • Keys can expire after a number of days (up to 3650), or never. The list shows when each was last used.
  • Up to 25 keys per account.
  • With GAMEPANEL_REQUIRE_MFA on, keys of accounts that have not set up a second factor stop working until they do.
  • Revoke a key under Account at any time; SFTP sessions using it end within seconds.

Browsers use a session cookie instead. Requests that change something must come from the panel's own site (the Origin is checked), so other websites cannot act for a signed-in user.

Errors ​

Errors use RFC 9457 problem details (application/problem+json):

json
{
  "title": "Unprocessable Entity",
  "status": 422,
  "detail": "this egg has no variable FOO"
}
StatusUsually means
400The request is malformed
401Not signed in, or the key is wrong, expired or revoked
403Signed in, but not allowed (missing permission, suspended server, not an admin)
404Not found, or no access: servers you cannot see look exactly like servers that do not exist
409Conflicts with the current state (e.g. the email is taken, the server is installing)
422A value is invalid; detail says which and why
429Too many requests, try later
503The node is offline

Common calls ​

TaskCall
List your serversGET /api/servers
One serverGET /api/servers/{uuid}
Start, stop, restart, killPOST /api/servers/{uuid}/power with {"action": "restart"}
Send a console commandPOST /api/servers/{uuid}/command with {"command": "say hi"}
Read a fileGET /api/servers/{uuid}/files/content?path=/server.properties
Write a filePUT /api/servers/{uuid}/files/content with path and content in the body
Start a backupPOST /api/servers/{uuid}/backups
Usage historyGET /api/servers/{uuid}/metrics

Example: restart a server ​

sh
curl -X POST https://panel.example.com/api/servers/b910c3f2-.../power \
  -H "Authorization: Bearer $GAMEPANEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"restart"}'

For shops and billing systems ​

Creating servers, accounts, suspension, safe retries with external_id, and signed webhooks are described in Creating servers.

For Pterodactyl tools ​

Bots and apps written for Pterodactyl's client API can work with a GamePanel key. See Pterodactyl client API.

All endpoints ​

The API reference lists every endpoint with its parameters, bodies and responses, and can send requests to your panel. It is generated from the same OpenAPI description, which you can download. By area:

AreaPaths
Sign-in and account/auth/... (login, sessions, two-factor, passkeys, API keys, single sign-on)
Servers/servers, /servers/{uuid}, /details, /power, /command, /reinstall, /metrics
Files/servers/{uuid}/files...
Backups/servers/{uuid}/backups...
Schedules/servers/{uuid}/schedules...
Startup/servers/{uuid}/startup
Network/servers/{uuid}/network...
Databases/servers/{uuid}/databases..., /database-hosts (admin)
Mods/servers/{uuid}/mods...
Access/servers/{uuid}/users..., /servers/{uuid}/invites..., /permissions
Activity/servers/{uuid}/activity, /audit (admin)
Admin/nodes..., /eggs..., /users..., /invites..., /webhooks..., /servers/{uuid}/limits, /owner, /suspend, /unsuspend, /external-id

Released under the AGPL-3.0 license.