Introduction
The Pterodactyl Wings API is a RESTful HTTP API built with Go and the Gin framework. It provides programmatic access to server management, file operations, backups, and real-time communication via WebSockets.All API requests to Wings originate from the Pterodactyl Panel backend. Direct client access is not supported for most endpoints.
Base URL
The API is accessible at:- Host:
0.0.0.0 - Port:
8080(configurable inconfig.yml) - SSL: Optional (configured via
api.sslin config)
API Architecture
Endpoint Structure
Wings organizes endpoints into logical groups:System Endpoints
Server Management
File Management
Remote Downloads
Backup Management
Signed URL Endpoints
These endpoints use JWT tokens instead of Bearer authentication:Server Transfers
Response Formats
Success Responses
All successful responses return JSON with appropriate HTTP status codes:OK
Request completed successfully with data returned.
Accepted
Request accepted for background processing.
No Content
Request completed successfully with no data to return.
Error Responses
All errors include a unique request ID for troubleshooting:Common Error Codes
Bad Request
Invalid request data or parameters.
Unauthorized
Missing or invalid authentication headers.
Forbidden
Authentication provided but insufficient permissions.
Not Found
Requested resource does not exist.
Unprocessable Entity
Validation failed on request data.
Internal Server Error
Unexpected server error occurred.
Bad Gateway
Server is in invalid state for operation.
Gateway Timeout
Request took too long to process.
Filesystem-Specific Errors
File operation endpoints may return specialized error messages:Rate Limiting
WebSocket Rate Limits
WebSocket connections enforce multiple rate limits:Upload Limits
Request Tracking
All API responses include a unique request identifier in theX-Request-Id header:
- Automatically generated for each request
- Included in error responses
- Logged for debugging purposes
- Useful for correlating Panel and Wings logs
CORS Configuration
Wings sets the following CORS headers:The
Access-Control-Allow-Origin header is dynamically set based on the panel_location and allowed_origins configuration options.Private Network Access
Whenallow_cors_private_network is enabled:
Trusted Proxies
Wings can be configured to trust specific proxy IP addresses for client IP resolution:X-Forwarded-For headers from trusted proxies to identify the true client IP address.