Pterodactyl uses API keys for authentication. Different API key types provide access to different parts of the API.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pterodactyl/panel/llms.txt
Use this file to discover all available pages before exploring further.
API Key Types
Application API Keys
Application API keys provide administrative access to the Panel and are used with the Application API. Key Prefix:ptla_
Creating Application Keys:
- Navigate to the Admin panel
- Go to Application API in the sidebar
- Click Create New
- Set permissions for each resource type
- Copy the generated key (shown only once)
- None (0) - No access
- Read (1) - Read-only access
- Read & Write (2) - Create and modify
- Read, Write & Delete (3) - Full access
- Users
- Nodes
- Allocations
- Servers
- Locations
- Nests
- Eggs
- Database Hosts
- Server Databases
Client API Keys
Client API keys provide user-level access and are used with the Client API. Key Prefix:ptlc_
Creating Client Keys:
- Go to Account Settings
- Navigate to API Credentials
- Click Create API Key
- Optionally set allowed IP addresses
- Provide a description
- Copy the generated key (shown only once)
Making Authenticated Requests
Using Bearer Token
Include your API key in theAuthorization header:
Required Headers
All API requests must include:API Key Structure
API keys consist of two parts:- Identifier (16 characters) - Prefix + random string
- Token (32 characters) - Encrypted and stored in database
{prefix}_{identifier}{token}
Example:
IP Restrictions
Client API keys support IP address restrictions:- Specify allowed IP addresses (comma-separated)
- Supports CIDR notation (e.g.,
192.168.1.0/24) - Leave blank to allow all IPs
Key Expiration
API keys can be configured with an expiration date:- Set
expires_attimestamp when creating keys - Expired keys will be rejected automatically
- Keys track last usage via
last_used_atfield
Security Best Practices
- Never commit API keys to version control
- Use environment variables to store keys
- Rotate keys regularly, especially after team member changes
- Use IP restrictions when possible
- Grant minimum required permissions for Application API keys
- Delete unused keys immediately
- Monitor key usage via
last_used_atfield - Set expiration dates for temporary integrations
Key Limits
Users are limited to 25 API keys per account to prevent abuse.Example: Creating a Server
Troubleshooting
401 Unauthorized
- Verify the API key is correct
- Check that the key hasn’t expired
- Ensure proper
Authorizationheader format
403 Forbidden
- For Application API: Check resource permissions
- For Client API: Verify access to the requested server
- Check IP restrictions if configured
Invalid API Key Format
- Ensure no extra spaces or line breaks
- Verify the correct prefix (
ptla_orptlc_) - Check that the full key was copied
