Pterodactyl API Documentation

Introduction

The Pterodactyl API allows you to interact with the Pterodactyl Panel programmatically. Below is a simplified guide to using the API endpoints.

API Key

To authenticate with the Pterodactyl API, you need to use an API key. Include this key in the `Authorization` header as follows:

Authorization: Bearer YOUR_API_KEY

Request

GET /api/client/servers

Response

{
  "data": [
    {
      "id": "server_id",
      "name": "Server Name",
      "description": "Description of the server",
      "status": "online"
    }
  ]
}

Request

GET /api/client/servers/{id}

Response

{
  "data": {
    "id": "server_id",
    "name": "Server Name",
    "description": "Description of the server",
    "status": "online",
    "resources": {
      "cpu": "75%",
      "memory": "512MB",
      "disk": "10GB"
    }
  }
}

Request

POST /api/client/servers/{id}/power
Content-Type: application/json

{
  "action": "start" // or "stop", "restart"
}

Response

{
  "status": "success",
  "message": "Power action executed."
}

Request

GET /api/application/eggs/{id}

Response

{
  "data": {
    "id": "egg_id",
    "name": "Egg Name",
    "description": "Description of the egg",
    "variables": {
      "key": "value"
    }
  }
}

Request

GET /api/application/users/{id}

Response

{
  "data": {
    "id": "user_id",
    "username": "Username",
    "email": "user@example.com",
    "role": "admin"
  }
}
Back to Docs