List Servers
GET /api/servers
Authorization: Bearer {token}
Lists all servers. Users see their own servers, admins see all servers.
Authentication
Requires authentication with valid session token.
Response
Array of server objects
INSTALLING | STARTING | RUNNING | STOPPING | STOPPED | SUSPENDED | MAINTENANCE | RESTORING | ERROR
Memory limit in MiB (BigInt as string)
Disk limit in MiB (BigInt as string)
CPU limit as percentage (100 = 1 core)
Swap in MiB: -1 = unlimited, 0 = disabled, positive values = limited
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"shortId": "550e8400",
"name": "Minecraft Server",
"description": "My awesome server",
"status": "RUNNING",
"memory": "2048",
"disk": "10240",
"cpu": 100,
"swap": "-1",
"node": {
"id": "node-1",
"displayName": "US East 1",
"isOnline": true,
"location": {
"name": "New York",
"country": "US"
}
},
"blueprint": {
"id": "minecraft",
"name": "Minecraft Java"
},
"allocations": [
{
"id": "alloc-1",
"ip": "0.0.0.0",
"port": 25565,
"alias": "Main"
}
]
}
]
Get Server
GET /api/servers/{serverId}
Authorization: Bearer {token}
Retrieve detailed information about a specific server.
Path Parameters
Authentication
Requires server access (owner, admin, or member with permissions).
Response
Returns a detailed server object with all fields.
Create Server
POST /api/servers
Authorization: Bearer {token}
Content-Type: application/json
Create a new server instance. Admin only.
Authentication
Requires admin role.
Request Body
Server name (1-100 characters)
Node UUID where server will be deployed
Blueprint UUID (game type)
Owner user ID (defaults to current user)
CPU as percentage (100 = 1 thread)
CPU pinning (e.g., “0,1,2,3” or “0-4”)
Swap in MiB: -1 = unlimited, 0 = disabled, positive values = limited
Maximum number of backups
Maximum allocations user can add
Array of allocation IDs (at least one required)
Override blueprint config
Override blueprint variables (key-value pairs)
Selected docker image from blueprint
null = inherit global, true = enabled, false = disabled
Inactivity timeout in minutes (1-10080)
{
"name": "My Minecraft Server",
"description": "Survival server",
"nodeId": "node-uuid",
"blueprintId": "minecraft-java",
"memory": 2048,
"disk": 10240,
"cpu": 100,
"swap": 512,
"backupLimit": 5,
"allocationLimit": 2,
"allocationIds": ["alloc-1"],
"variables": {
"MINECRAFT_VERSION": "1.20.4",
"SERVER_JARFILE": "server.jar"
},
"dockerImage": "ghcr.io/pterodactyl/yolks:java_21"
}
Response
Returns the created server object with status 201.
Errors
400 - Validation failed, node offline, insufficient resources, or invalid allocations
404 - Node or blueprint not found
500 - Daemon communication error
Update Server
PATCH /api/servers/{serverId}
Authorization: Bearer {token}
Content-Type: application/json
Update server configuration.
Path Parameters
Request Body
All fields are optional. Only admins can modify resources and status.
Server name (1-100 characters)
Memory limit in MiB (admin only)
Disk limit in MiB (admin only)
CPU percentage (admin only)
Server status (admin only)
Auto-shutdown setting (admin only)
Response
Returns the updated server object.
Delete Server
DELETE /api/servers/{serverId}
Authorization: Bearer {token}
Permanently delete a server. Admin only.
Path Parameters
Response
Power Actions
Start Server
POST /api/servers/{serverId}/start
Authorization: Bearer {token}
Start the server.
Stop Server
POST /api/servers/{serverId}/stop
Authorization: Bearer {token}
Gracefully stop the server using configured stop command.
Restart Server
POST /api/servers/{serverId}/restart
Authorization: Bearer {token}
Restart the server.
Kill Server
POST /api/servers/{serverId}/kill
Authorization: Bearer {token}
Forcefully kill the server process (SIGKILL).
Response
All power actions return:
{
"success": true,
"status": "STARTING" // or STOPPING, STOPPED
}
Errors
400 - Node is offline or server is suspended
500 - Daemon communication error
Send Command
POST /api/servers/{serverId}/command
Authorization: Bearer {token}
Content-Type: application/json
Send a command to the server console.
Request Body
{
"command": "say Hello world!"
}
Response
Get Console Connection
GET /api/servers/{serverId}/console
Authorization: Bearer {token}
Get WebSocket connection information for server console.
Response
WebSocket URL to connect to
JWT token for WebSocket authentication (expires in 15 minutes)
{
"websocketUrl": "wss://node.example.com:8080/api/servers/550e8400-e29b-41d4-a716-446655440000/ws",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Startup Configuration
Get Startup Config
GET /api/servers/{serverId}/startup
Authorization: Bearer {token}
Get server startup configuration including variables and docker images.
Response
Currently selected docker image
Generated startup command with variables substituted
Stop command (e.g., “stop” or “SIGTERM”)
Update Startup Config
PATCH /api/servers/{serverId}/startup
Authorization: Bearer {token}
Content-Type: application/json
Request Body
Updated variable values (key-value pairs)
Selected docker image from available options
Custom commands to append
Reinstall Server
POST /api/servers/{serverId}/reinstall
Authorization: Bearer {token}
Run the installation script again (wipes server files).
Response
{
"success": true,
"message": "Server reinstalling...",
"status": "INSTALLING"
}
Change Blueprint
POST /api/servers/{serverId}/change-blueprint
Authorization: Bearer {token}
Content-Type: application/json
Change the server’s blueprint (game type).
Request Body
Docker image from new blueprint
Variable overrides for new blueprint
Whether to trigger reinstallation
Response
{
"success": true,
"message": "Blueprint changed successfully",
"server": { /* server object */ },
"reinstalling": false
}
File Management
File management endpoints are integrated with the server management API. See the File Manager documentation for details on file operations.
Backups
See Backups for backup management endpoints.