Skip to main content

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:
Default configuration:
  • Host: 0.0.0.0
  • Port: 8080 (configurable in config.yml)
  • SSL: Optional (configured via api.ssl in config)

API Architecture

Endpoint Structure

Wings organizes endpoints into logical groups:

System Endpoints

Server Management

File Management

Remote Downloads

Remote download endpoints require api.disable_remote_download to be false in the Wings configuration.

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 the X-Request-Id header:
This ID is:
  • 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

When allow_cors_private_network is enabled:
This allows CORS requests from private networks (RFC1918) in Chromium-based browsers.

Trusted Proxies

Wings can be configured to trust specific proxy IP addresses for client IP resolution:
When properly configured, Wings will use X-Forwarded-For headers from trusted proxies to identify the true client IP address.