Skip to main content
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": "[email protected]",
    "first_name": "John",
    "last_name": "Doe",
    "language": "en"
  }
}
id
integer
Unique user identifier
admin
boolean
Whether the user has administrator privileges
username
string
The user’s username
email
string
The user’s email address
first_name
string
User’s first name
last_name
string
User’s last name
language
string
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": "[email protected]",
    "password": "current_password"
  }'
email
string
required
The new email address
password
string
required
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"
  }'
current_password
string
required
The current account password
password
string
required
The new password (minimum 8 characters)
password_confirmation
string
required
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"
  }
}
image_url_data
string
Base64-encoded QR code image for authenticator apps
secret
string
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"
  }'
code
string
required
6-digit TOTP code from authenticator app
password
string
required
Current account password

Response

{
  "object": "recovery_tokens",
  "attributes": {
    "tokens": [
      "abcd1234",
      "efgh5678",
      "ijkl9012"
    ]
  }
}
tokens
array
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"
  }'
password
string
required
Current account 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
string
required
Description for the API key
allowed_ips
array
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..."
  }'
name
string
required
Descriptive name for the SSH key
public_key
string
required
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..."
  }'
fingerprint
string
required
The SSH key fingerprint to remove

Build docs developers (and LLMs) love