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.
The account endpoints allow users to manage their profile information, update credentials, and configure security settings.
Get Account Details
Retrieve information about the currently authenticated user.
curl -X GET "https://panel.example.com/api/client/account" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Response
{
"object": "user",
"attributes": {
"id": 1,
"admin": false,
"username": "john_doe",
"email": "john@example.com",
"first_name": "John",
"last_name": "Doe",
"language": "en"
}
}
Whether the user has administrator privileges
Preferred language code (e.g., “en”, “de”, “fr”)
Update Email Address
Update the authenticated user’s email address.
curl -X PUT "https://panel.example.com/api/client/account/email" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"email": "newemail@example.com",
"password": "current_password"
}'
Current account password for verification
Response
Returns 204 No Content on success.
Update Password
Update the authenticated user’s password. This will log out all other sessions.
curl -X PUT "https://panel.example.com/api/client/account/password" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"current_password": "old_password",
"password": "new_password",
"password_confirmation": "new_password"
}'
The current account password
The new password (minimum 8 characters)
Must match the new password
Response
Returns 204 No Content on success. All other sessions will be terminated.
Two-Factor Authentication
Get 2FA Setup Details
Get the QR code and secret for setting up two-factor authentication.
curl -X GET "https://panel.example.com/api/client/account/two-factor" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Response
{
"data": {
"image_url_data": "data:image/png;base64,...",
"secret": "JBSWY3DPEHPK3PXP"
}
}
Base64-encoded QR code image for authenticator apps
The TOTP secret key for manual entry
Enable Two-Factor Authentication
Enable 2FA by providing a valid TOTP code and password.
curl -X POST "https://panel.example.com/api/client/account/two-factor" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"code": "123456",
"password": "your_password"
}'
6-digit TOTP code from authenticator app
Response
{
"object": "recovery_tokens",
"attributes": {
"tokens": [
"abcd1234",
"efgh5678",
"ijkl9012"
]
}
}
Recovery codes for account access if 2FA device is lost. Store these securely.
Disable Two-Factor Authentication
Disable 2FA on the account.
curl -X POST "https://panel.example.com/api/client/account/two-factor/disable" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"password": "your_password"
}'
Response
Returns 204 No Content on success.
API Keys
List API Keys
Get all API keys for the authenticated user.
curl -X GET "https://panel.example.com/api/client/account/api-keys" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Create API Key
Create a new API key.
curl -X POST "https://panel.example.com/api/client/account/api-keys" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"description": "My API Key",
"allowed_ips": ["192.168.1.1", "10.0.0.0/8"]
}'
Description for the API key
Optional array of allowed IP addresses or CIDR ranges
Delete API Key
Delete an API key by its identifier.
curl -X DELETE "https://panel.example.com/api/client/account/api-keys/{identifier}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
SSH Keys
List SSH Keys
Get all SSH public keys associated with the account.
curl -X GET "https://panel.example.com/api/client/account/ssh-keys" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Add SSH Key
Add a new SSH public key to the account.
curl -X POST "https://panel.example.com/api/client/account/ssh-keys" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "My Laptop",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ..."
}'
Descriptive name for the SSH key
The SSH public key (ssh-rsa, ssh-ed25519, etc.)
Remove SSH Key
Remove an SSH key from the account.
curl -X POST "https://panel.example.com/api/client/account/ssh-keys/remove" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"fingerprint": "SHA256:abc123..."
}'
The SSH key fingerprint to remove