Client API
The Client API allows users to perform actions on servers they have access to. This includes server management, file operations, database management, and more.
Base URL
https://your-panel.com/api/client
Authentication
All Client API requests require a Client API key passed in the Authorization header:
curl "https://your-panel.com/api/client" \
-H "Authorization: Bearer ptlc_YOUR_CLIENT_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: Application/vnd.pterodactyl.v1+json"
API Sections
Account Management
Manage your account details, API keys, and authentication settings.
- Account Details - View and update account information
- Two-Factor Authentication - Enable/disable 2FA
- API Key Management - Create and manage API keys
- Password Management - Update account password
Server Management
Core server operations and information.
- List Servers - Get all servers you have access to
- Server Details - Get detailed server information
- Server Resources - View server resource usage
- Power Management - Start, stop, restart servers
- Console Access - WebSocket console connection
- Send Commands - Execute server commands
File Management
Complete file system operations for your servers.
- List Files - Browse server files and directories
- File Contents - Read file contents
- Upload Files - Upload files to server
- Download Files - Download files from server
- Create Directory - Create folders
- Delete Files - Delete files
- Copy Files - Copy files and directories
- Rename Files - Rename files and directories
- Compress Files - Create archives
Database Management
Manage server databases and users.
- List Databases - View all server databases
- Create Database - Create new databases
- Rotate Password - Change database passwords
- Delete Database - Remove databases
Scheduled Tasks
Automate server operations with schedules.
- List Schedules - View all scheduled tasks
- Create Schedule - Set up new schedules
- Manage Tasks - Add/edit/delete schedule tasks
- Update Schedule - Modify existing schedules
- Delete Schedule - Remove schedules
- Execute Schedule - Manually trigger schedules
Network & Allocations
Manage server network allocations and ports.
- List Allocations - View server allocations
- Assign Allocations - Get new allocations
- Primary Allocation - Set primary allocation
- Allocation Notes - Add notes to allocations
User Management
Manage subusers and permissions on servers.
- List Users - View server subusers
- User Permissions - Manage user permissions
- Create Subuser - Invite new subusers
- Remove Subuser - Remove subusers
Backups
(Available in some Pterodactyl installations)
- List Backups - View server backups
- Create Backup - Generate new backups
- Download Backup - Download backup files
- Delete Backup - Remove old backups
Common Parameters
Many endpoints support these optional parameters:
Include Parameters
Expand related resources in the response:
?include=egg,subusers,allocations
Pagination
For list endpoints:
?page=2&per_page=50
Filtering
Filter results by specific criteria:
?filter[name]=minecraft&filter[uuid]=1a7ce997
Sorting
Sort results by specific fields:
?sort=-created_at&sort=name
Response Format
All API responses follow this structure:
Single Resource
{
"object": "server",
"attributes": {
// Resource data
},
"meta": {
// Optional metadata
}
}
Resource Collection
{
"object": "list",
"data": [
{
"object": "server",
"attributes": {
// Resource data
}
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 50,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}
Getting Started
-
Generate a Client API Key
- Go to
https://your-panel.com/account/api
- Click "Create API Key"
- Copy the generated key
- Go to
-
Make Your First Request
curl "https://your-panel.com/api/client" \
-H "Authorization: Bearer YOUR_CLIENT_API_KEY" \
-H "Accept: Application/vnd.pterodactyl.v1+json" -
Explore Available Servers
- Use the response to see servers you have access to
- Note the server identifiers for subsequent requests
Rate Limits
The Client API is limited to 240 requests per minute per API key. Monitor the rate limit headers in responses:
X-RateLimit-Limit: 240
X-RateLimit-Remaining: 235
X-RateLimit-Reset: 1640995200
Source Code References
All Client API endpoints are implemented in the Pterodactyl Panel source code:
- Controllers:
app/Http/Controllers/Api/Client/
- Routes:
routes/api-client.php
- Models:
app/Models/
- Services:
app/Services/
For detailed source code references, see our Source References Guide.
Next Steps
- Start with Account Management to test your API key
- Explore Server Management for basic server operations
- Review Authentication for security best practices