FlashPanel API Documentation

Postman collection → OpenAPI spec →

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {{AUTH_TOKEN}}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by follow API token.

Applications

APIs for managing server applications (PHP, MySQL, Nginx, etc.)

List applications.

GET
https://flashpanel.io
/api/servers/applications
requires authentication

Get available and installed applications for a server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Query Parameters

extension
string

Filter by extension group (php-extension, ols-extension).

Example:
php-extension
binary_name
string

Required with extension. Base binary name.

Example:
php8.3

Body Parameters

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/applications?extension=php-extension&binary_name=php8.3" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"extension\": \"bngzmiyvdljnikhw\",
    \"binary_name\": \"aykcmyuwpwlvqwrs\",
    \"os_version\": 4326.41688
}"
Example response:
{
    "data": [
        {
            "id": 1,
            "name": "PHP 8.3",
            "binary_name": "php8.3",
            "installed": true
        }
    ]
}

Start application.

POST
https://flashpanel.io
/api/servers/{server}/applications/{application}/start
requires authentication

Start the application on the given server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
application
integer
required

The application ID.

Example:
5
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/applications/5/start" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Stop application.

POST
https://flashpanel.io
/api/servers/{server}/applications/{application}/stop
requires authentication

Stop the application on the given server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
application
integer
required

The application ID.

Example:
5
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/applications/5/stop" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Restart application.

POST
https://flashpanel.io
/api/servers/{server}/applications/{application}/restart
requires authentication

Restart the application on the given server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
application
integer
required

The application ID.

Example:
5
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/applications/5/restart" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Toggle auto restart.

POST
https://flashpanel.io
/api/servers/{server}/applications/{application}/auto-restart
requires authentication

Enable or disable automatic restart monitoring for an application.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
application
integer
required

The application ID.

Example:
5

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/applications/5/auto-restart" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"enabled\": true
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
{
    "message": "This application does not support auto restart feature"
}

Update OLS admin.

POST
https://flashpanel.io
/api/servers/{server}/applications/{application}/ols-admin-update
requires authentication

Update OpenLiteSpeed admin username and password.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
application
integer
required

The application ID.

Example:
5

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/applications/5/ols-admin-update" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"admin_username\": \"admin\",
    \"admin_password\": \"AdminP@ss123\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
{
    "message": "Not Found"
}

List applications.

GET
https://flashpanel.io
/api/servers/{server}/applications
requires authentication

Get available and installed applications for a server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Query Parameters

extension
string

Filter by extension group (php-extension, ols-extension).

Example:
php-extension
binary_name
string

Required with extension. Base binary name.

Example:
php8.3

Body Parameters

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/applications?extension=php-extension&binary_name=php8.3" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"extension\": \"bngzmiyvdljnikhw\",
    \"binary_name\": \"aykcmyuwpwlvqwrs\",
    \"os_version\": 4326.41688
}"
Example response:
{
    "data": [
        {
            "id": 1,
            "name": "PHP 8.3",
            "binary_name": "php8.3",
            "installed": true
        }
    ]
}

Install application.

POST
https://flashpanel.io
/api/servers/{server}/applications
requires authentication

Install an application on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/applications" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"version\": \"8.3\",
    \"app_id\": 4432,
    \"password\": \"SecureP@ss\",
    \"port\": 7700,
    \"admin_username\": \"admin\",
    \"admin_password\": \"AdminP@ss\",
    \"manager_password\": \"ManagerP@ss\",
    \"user\": \"minioadmin\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Update application.

PUT
PATCH
https://flashpanel.io
/api/servers/{server}/applications/{application}
requires authentication

Update an installed application to the latest version.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
application
integer
required

The application ID.

Example:
5
Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/applications/5" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
{
    "message": "This app does not need to be updated"
}

Uninstall application.

DELETE
https://flashpanel.io
/api/servers/{server}/applications/{application}
requires authentication

Uninstall an application from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
application
integer
required

The application ID.

Example:
5
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/applications/5" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
{
    "message": "This app cannot be uninstalled"
}

Authentication

APIs for user authentication and token management

Get API token.

POST
https://flashpanel.io
/api/token

Retrieves an access token and a code for the user. Automatically deletes old tokens, keeping only the 10 most recent tokens.

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"password\": \"Pa$$w0rd!\",
    \"code\": \"123456\",
    \"device_name\": \"My Device\"
}"
Example response:
{
    "token": "123|xxxxxx",
    "code": "yyyyyy"
}
{
    "message": "The provided credentials are incorrect.",
    "errors": {
        "email": [
            "The provided credentials are incorrect."
        ]
    }
}

Backups

APIs for managing server backup configurations

Get backup configuration information.

GET
https://flashpanel.io
/api/servers/{server}/backups/{backup}

This function retrieves the backup configuration information for a specific backup of a server. The function requires a backup token to be provided in the request query parameters.

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
backup
integer
required

The backup.

Example:
101002
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/backups/101002" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
{
    "message": "Invalid Token"
}

Download backup script

GET
https://flashpanel.io
/api/servers/{server}/backups/{backup}/script

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
backup
integer
required

The backup.

Example:
101002
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/backups/101002/script" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
{
    "message": "Invalid Token"
}

Get backup info

GET
https://flashpanel.io
/api/servers/{server}/backups/{backup}/info
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
backup
integer
required

The backup.

Example:
101002
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/backups/101002/info" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
    "message": "Unauthenticated."
}

Restore selected backup file

POST
https://flashpanel.io
/api/servers/{server}/backups/{backup}/restore
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
backup
integer
required

The backup.

Example:
101002

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/backups/101002/restore" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"file_path\": \"architecto\",
    \"restore_type\": \"database\",
    \"site_id\": 4326.41688,
    \"database_id\": 4326.41688
}"

Clone Backup Configuration

POST
https://flashpanel.io
/api/servers/{server}/backups/{backup}/clone
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
backup
integer
required

The backup.

Example:
101002

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/backups/101002/clone" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"servers\": [
        16
    ],
    \"all_sites\": false,
    \"all_databases\": false
}"

List backup configurations.

GET
https://flashpanel.io
/api/servers/{server}/backups
requires authentication

Get all backup configurations for a server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/backups" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "memo": "Daily backup",
            "drive": "drive"
        }
    ]
}

Create backup configuration.

POST
https://flashpanel.io
/api/servers/{server}/backups
requires authentication

Create a new backup configuration for a server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
multipart/form-data
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/backups" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "code=oauth_code_123"\
    --form "drive=drive"\
    --form "host=backup.example.com"\
    --form "user=backupuser"\
    --form "port=22"\
    --form "auth_password=1"\
    --form "password=secretpass"\
    --form "passphrase=myPassphrase"\
    --form "s3_bucket_name=my-backups"\
    --form "s3_provider=s3"\
    --form "s3_access_key_id=AKIAIOSFODNN7EXAMPLE"\
    --form "s3_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"\
    --form "s3_region=us-east-1"\
    --form "s3_endpoint=https://s3.us-west-2.amazonaws.com"\
    --form "memo=Daily backup"\
    --form "expression=0 0 * * *"\
    --form "cycle=7"\
    --form "all_sites=1"\
    --form "sites[][id]=1"\
    --form "sites[][excludes][]=architecto"\
    --form "excludes[]=architecto"\
    --form "excludes[]=node_modules"\
    --form "all_databases=1"\
    --form "databases[]=1"\
    --form "private_key=@/private/var/folders/qq/kvhmbqts2kjdk_q1d18jdvg80000gn/T/php8k6j8ktd2r4i6AxOmNu" 
Example response:
{
    "backup": {
        "id": 1,
        "memo": "Daily backup"
    },
    "event": {
        "id": 1,
        "status": "running"
    }
}

Update backup configuration.

PUT
PATCH
https://flashpanel.io
/api/servers/{server}/backups/{backup}
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
backup
integer
required

The backup configuration ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/backups/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"is_active\": true,
    \"memo\": \"Daily backup\",
    \"expression\": \"0 0 * * *\",
    \"cycle\": 7,
    \"all_sites\": true,
    \"excludes\": [
        \"architecto\"
    ],
    \"excludes[]\": \"node_modules\",
    \"sites\": [
        {
            \"id\": 1,
            \"excludes\": [
                \"architecto\"
            ]
        }
    ],
    \"all_databases\": true,
    \"databases\": [
        1,
        2
    ]
}"
Example response:
{
    "backup": {
        "id": 1,
        "memo": "Daily backup",
        "is_active": true
    },
    "event": {
        "id": 1,
        "status": "running"
    }
}

Delete backup configuration

DELETE
https://flashpanel.io
/api/servers/{server}/backups/{backup}
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
backup
integer
required

The backup.

Example:
101002
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/backups/101002" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

List backup history.

GET
https://flashpanel.io
/api/servers/{server}/backup-histories
requires authentication

Retrieve the backup history for a server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Query Parameters

sort
string

Sort field. Default: -id.

Example:
-id
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/backup-histories?sort=-id" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "name": "backup-2024-01-01",
            "size": "1.5 GB",
            "time": "120"
        }
    ]
}

Commands

APIs for executing and viewing site commands

List commands.

GET
https://flashpanel.io
/api/sites/{site}/commands
requires authentication

Retrieves a paginated list of commands executed on a given site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/commands" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "script": "ls -la",
            "output": "..."
        }
    ]
}

Execute command.

POST
https://flashpanel.io
/api/sites/{site}/commands
requires authentication

Store and execute a new command for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/commands" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"script\": \"ls -la\"
}"
Example response:
{
    "data": {
        "id": 1,
        "script": "ls -la",
        "status": "running"
    }
}

DNS & Bind9

APIs for managing Bind9 DNS zones

Import DNS zone.

POST
https://flashpanel.io
/api/servers/{server}/bind9/zones/{zone}/import
requires authentication

Import DNS records from a zone file.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
multipart/form-data
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
zone
string
required

The zone name.

Example:
example.com

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/bind9/zones/example.com/import" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@/private/var/folders/qq/kvhmbqts2kjdk_q1d18jdvg80000gn/T/phpmdr0pcgfifn9eAiba9Z" 
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Export DNS zone.

POST
https://flashpanel.io
/api/servers/{server}/bind9/zones/{zone}/export
requires authentication

Export DNS zone to a file on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
zone
string
required

The zone name.

Example:
example.com
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/bind9/zones/example.com/export" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Download DNS zone file.

GET
https://flashpanel.io
/api/servers/{server}/bind9/zones/{zone}/download
requires authentication

Download the exported DNS zone file.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
zone
string
required

The zone name.

Example:
example.com
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/bind9/zones/example.com/download" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
file The zone file content.

List DNS zones.

GET
https://flashpanel.io
/api/servers/{server}/bind9/zones
requires authentication

Get all DNS zones configured on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/bind9/zones" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
    "message": "Unauthenticated."
}

Create zone

POST
https://flashpanel.io
/api/servers/{server}/bind9/zones
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/bind9/zones" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Update zone

PUT
PATCH
https://flashpanel.io
/api/servers/{server}/bind9/zones/{zone}
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
zone
string
required

The zone.

Example:
architecto
Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/bind9/zones/architecto" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Delete zone

DELETE
https://flashpanel.io
/api/servers/{server}/bind9/zones/{zone}
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
zone
string
required

The zone.

Example:
architecto
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/bind9/zones/architecto" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

List DNS records.

GET
https://flashpanel.io
/api/servers/{server}/bind9/zones/{zone}/records
requires authentication

Get all DNS records for a specific zone.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
zone
string
required

The zone name.

Example:
example.com

Query Parameters

search
string

Search query.

Example:
www
match
string

Search match type: any, all.

Example:
any
per_page
integer

Items per page.

Example:
50
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/bind9/zones/example.com/records?search=www&match=any&per_page=50" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "type": "A",
            "name": "www",
            "content": "192.168.1.1",
            "ttl": 3600
        }
    ]
}

Create DNS record.

POST
https://flashpanel.io
/api/servers/{server}/bind9/zones/{zone}/records
requires authentication

Create a new DNS record in the zone.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
zone
string
required

The zone name.

Example:
example.com

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/bind9/zones/example.com/records" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"A\",
    \"name\": \"www\",
    \"content\": \"192.168.1.1\",
    \"ttl\": 3600,
    \"priority\": 10
}"
Example response:

Update DNS record.

PUT
PATCH
https://flashpanel.io
/api/servers/{server}/bind9/zones/{zone}/records/{record}
requires authentication

Update an existing DNS record in the zone.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
zone
string
required

The zone name.

Example:
example.com
record
string
required

Record ID.

Example:
www.example.com._A

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/bind9/zones/example.com/records/www.example.com._A" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"A\",
    \"name\": \"www\",
    \"content\": \"192.168.1.2\",
    \"ttl\": 7200,
    \"priority\": 10
}"
Example response:

Delete DNS record.

DELETE
https://flashpanel.io
/api/servers/{server}/bind9/zones/{zone}/records/{record}
requires authentication

Delete a DNS record from the zone.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
zone
string
required

The zone name.

Example:
example.com
record
string
required

Record ID.

Example:
www.example.com._A
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/bind9/zones/example.com/records/www.example.com._A" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:

Database Users

APIs for managing database users on servers

Sync database users.

GET
https://flashpanel.io
/api/servers/{server}/database-users/sync
requires authentication

Synchronize database users with the actual database server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/database-users/sync" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"mysql\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

List database users.

GET
https://flashpanel.io
/api/servers/{server}/database-users
requires authentication

Get all database users on a server with their associated databases.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/database-users" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "name": "dbuser",
            "type": "mysql"
        }
    ]
}

Create database user.

POST
https://flashpanel.io
/api/servers/{server}/database-users
requires authentication

Create a new database user on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/database-users" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"mysql\",
    \"name\": \"myuser\",
    \"password\": \"SecureP@ss123\",
    \"databases\": [
        1,
        2
    ],
    \"access_anywhere\": false,
    \"identified_with\": \"mysql_native_password\",
    \"roles\": [
        {
            \"id\": 16,
            \"roles\": [
                \"ngzmiyvdljnikhwa\"
            ]
        }
    ]
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Update database user.

PUT
PATCH
https://flashpanel.io
/api/servers/{server}/database-users/{database_user}
requires authentication

Update a database user's password, access permissions, or database grants.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
database_user
integer
required

The database user ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/database-users/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"mysql\",
    \"password\": \"NewP@ss123\",
    \"databases\": [
        1,
        2
    ],
    \"roles\": [
        {
            \"id\": 1,
            \"roles\": [
                \"architecto\"
            ]
        }
    ],
    \"access_anywhere\": false,
    \"identified_with\": \"mysql_native_password\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Delete database user.

DELETE
https://flashpanel.io
/api/servers/{server}/database-users/{database_user}
requires authentication

Delete a database user from the server. Cannot delete users linked to PHPMyAdmin, WordPress, or other application sites.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
database_user
integer
required

The database user ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/database-users/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
{
    "message": "Cannot delete database user linked to site"
}

Databases

APIs for managing databases on servers

Export database.

POST
https://flashpanel.io
/api/servers/{server}/databases/{database}/export
requires authentication

Export a database to a backup file on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
database
integer
required

The database ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/databases/1/export" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Import database.

POST
https://flashpanel.io
/api/servers/{server}/databases/{database}/import
requires authentication

Import data into a database from a file on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
database
integer
required

The database ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/databases/1/import" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/home\\/flashvps\\/backup.sql.gz\",
    \"remove\": false
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
{
    "message": "Cannot import system database"
}

Download database backup.

POST
https://flashpanel.io
/api/servers/{server}/databases/{database}/download
requires authentication

Download the exported database backup file.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
database
integer
required

The database ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/databases/1/download" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
file The gzipped database backup file.
{
    "message": "File not found"
}

List databases.

GET
https://flashpanel.io
/api/servers/{server}/databases
requires authentication

Get all databases on a server with their associated users.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/databases" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "name": "mydb",
            "type": "mysql"
        }
    ]
}

Create database.

POST
https://flashpanel.io
/api/servers/{server}/databases
requires authentication

Create a new database on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/databases" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"mysql\",
    \"name\": \"mydb\",
    \"users\": [
        1,
        2
    ]
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Update database.

PUT
PATCH
https://flashpanel.io
/api/servers/{server}/databases/{database}
requires authentication

Update database user access permissions.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
database
integer
required

The database ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/databases/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"mysql\",
    \"users\": [
        1,
        2
    ]
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Delete database.

DELETE
https://flashpanel.io
/api/servers/{server}/databases/{database}
requires authentication

Delete a database from the server. Cannot delete system databases or databases used by PHPMyAdmin sites.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
database
integer
required

The database ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/databases/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Get MySQL config.

GET
https://flashpanel.io
/api/servers/{server}/mysql
requires authentication

Retrieve MySQL/MariaDB configuration with current values from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/mysql" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[
    {
        "key": "max_connections",
        "value": "151",
        "type": "number"
    }
]

Update MySQL config.

POST
https://flashpanel.io
/api/servers/{server}/mysql
requires authentication

Update MySQL/MariaDB configuration on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/mysql" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Deployments

APIs for managing site deployments and deployment scripts

List deployments.

GET
https://flashpanel.io
/api/sites/{site}/deploys
requires authentication

Retrieves a paginated collection of deployments for a given site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Query Parameters

page
integer

Page number. Default: 1.

Example:
1
per_page
integer

Items per page. Default: 10.

Example:
15
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/deploys?page=1&per_page=15" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "status": "success",
            "created_at": "2024-01-01T00:00:00Z"
        }
    ]
}

Get deployment variables.

GET
https://flashpanel.io
/api/sites/{site}/deploys/variables
requires authentication

Retrieves the list of available deployment script variables.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/deploys/variables" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "SITE_NAME": "example.com",
    "SITE_PATH": "/home/user/example.com"
}

Update deployment script.

PUT
https://flashpanel.io
/api/sites/{site}/deploys/script
requires authentication

Updates the deployment script for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/1/deploys/script" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"script\": \"cd $SITE_PATH && git pull\"
}"
Example response:
{
    "data": {
        "id": 1,
        "name": "example.com"
    }
}

Deploy now.

POST
https://flashpanel.io
/api/sites/{site}/deploys/now
requires authentication

Deploy the latest source code. The system will run the deployment script.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/deploys/now" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "deployment": {
        "id": 1,
        "status": "running"
    },
    "event": {
        "id": 1,
        "status": "running"
    }
}

Refresh deployment token.

PUT
https://flashpanel.io
/api/sites/{site}/deploys/refresh-token
requires authentication

Refreshes the deployment webhook token for the site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/1/deploys/refresh-token" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "link": "https://example.com/deploy?token=..."
}

Toggle auto-deploy.

PUT
https://flashpanel.io
/api/sites/{site}/deploys/auto
requires authentication

Enables or disables automatic deployment for the site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/1/deploys/auto" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 1,
        "name": "example.com",
        "autodeploy_enabled": true
    }
}

Create deploy key.

POST
https://flashpanel.io
/api/sites/{site}/deploys/key
requires authentication

Automatically generates a new RSA private key and adds it to the site's server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/deploys/key" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 1,
        "name": "example.com",
        "attrs": {
            "deploy_key": "ssh-rsa AAAA..."
        }
    }
}

Delete deploy key.

DELETE
https://flashpanel.io
/api/sites/{site}/deploys/key
requires authentication

Deletes the deploy key for a given site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/1/deploys/key" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 1,
        "name": "example.com",
        "attrs": {
            "deploy_key": ""
        }
    }
}

Docker

APIs for managing Docker images

Prune Docker images.

POST
https://flashpanel.io
/api/servers/{server}/docker/images/prune
requires authentication

Remove all unused Docker images from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/docker/images/prune" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

List Docker images.

GET
https://flashpanel.io
/api/servers/{server}/docker/images
requires authentication

Get all Docker images on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/docker/images" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
    "message": "Unauthenticated."
}

Delete Docker image.

DELETE
https://flashpanel.io
/api/servers/{server}/docker/images/{image}
requires authentication

Remove a Docker image from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
image
string
required

Image ID or name.

Example:
nginx:latest

Query Parameters

force
boolean

Force remove even if in use.

Example:
true
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/docker/images/nginx:latest?force=1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

Start container.

POST
https://flashpanel.io
/api/servers/{server}/docker/containers/{container}/start
requires authentication

Start a stopped or paused Docker container.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
container
string
required

Container ID or name.

Example:
abc123

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/docker/containers/abc123/start" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"Status\": 0
}"
Example response:
[Empty response]

Stop container.

POST
https://flashpanel.io
/api/servers/{server}/docker/containers/{container}/stop
requires authentication

Stop a running Docker container.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
container
string
required

Container ID or name.

Example:
abc123
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/docker/containers/abc123/stop" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

Restart container.

POST
https://flashpanel.io
/api/servers/{server}/docker/containers/{container}/restart
requires authentication

Restart a Docker container.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
container
string
required

Container ID or name.

Example:
abc123
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/docker/containers/abc123/restart" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

Pause container.

POST
https://flashpanel.io
/api/servers/{server}/docker/containers/{container}/pause
requires authentication

Pause a running Docker container.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
container
string
required

Container ID or name.

Example:
abc123
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/docker/containers/abc123/pause" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

Rename container.

POST
https://flashpanel.io
/api/servers/{server}/docker/containers/{container}/rename
requires authentication

Rename a Docker container.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
container
string
required

Container ID or name.

Example:
abc123

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/docker/containers/abc123/rename" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"mycontainer_new\"
}"
Example response:
[Empty response]

Get container logs.

POST
https://flashpanel.io
/api/servers/{server}/docker/containers/{container}/logs
requires authentication

Get the last 100 lines of container logs.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
container
string
required

Container ID or name.

Example:
abc123
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/docker/containers/abc123/logs" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
"Log output text..."

Get container stats.

GET
https://flashpanel.io
/api/servers/{server}/docker/containers/{container}/stats
requires authentication

Get real-time resource usage statistics for a container.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
container
string
required

Container ID or name.

Example:
abc123
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/docker/containers/abc123/stats" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "CPUPerc": "0.50%",
    "MemUsage": "100MiB / 1GiB",
    "NetIO": "1kB / 2kB"
}

List containers.

GET
https://flashpanel.io
/api/servers/{server}/docker/containers
requires authentication

Get all Docker containers on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/docker/containers" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[
    {
        "ID": "abc123",
        "Names": "mycontainer",
        "Image": "nginx",
        "State": "running"
    }
]

Get container details.

GET
https://flashpanel.io
/api/servers/{server}/docker/containers/{container}
requires authentication

Get detailed information about a Docker container.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
container
string
required

Container ID or name.

Example:
abc123
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/docker/containers/abc123" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "Id": "abc123",
    "Name": "mycontainer",
    "State": {
        "Status": "running"
    }
}

Delete container.

DELETE
https://flashpanel.io
/api/servers/{server}/docker/containers/{container}
requires authentication

Stop and remove a Docker container.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
container
string
required

Container ID or name.

Example:
abc123

Query Parameters

force
boolean

Force remove even if running.

Example:
true
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/docker/containers/abc123?force=1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

Clone Docker volume.

POST
https://flashpanel.io
/api/servers/{server}/docker/volumes/{volume}/clone
requires authentication

Create a copy of a Docker volume with a new name.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
volume
string
required

Source volume name.

Example:
mydata

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/docker/volumes/mydata/clone" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"mydata_backup\"
}"
Example response:
[Empty response]

Prune Docker volumes.

POST
https://flashpanel.io
/api/servers/{server}/docker/volumes/prune
requires authentication

Remove all unused Docker volumes from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/docker/volumes/prune" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

List Docker volumes.

GET
https://flashpanel.io
/api/servers/{server}/docker/volumes
requires authentication

Get all Docker volumes on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/docker/volumes" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
    "message": "Unauthenticated."
}

Delete Docker volume.

DELETE
https://flashpanel.io
/api/servers/{server}/docker/volumes/{volume}
requires authentication

Remove a Docker volume from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
volume
string
required

Volume name.

Example:
mydata
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/docker/volumes/mydata" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

Prune Docker networks.

POST
https://flashpanel.io
/api/servers/{server}/docker/networks/prune
requires authentication

Remove all unused Docker networks from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/docker/networks/prune" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

List Docker networks.

GET
https://flashpanel.io
/api/servers/{server}/docker/networks
requires authentication

Get all Docker networks on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/docker/networks" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
    "message": "Unauthenticated."
}

File Management

APIs for managing files and directories on the server via agent

Get system info.

GET
https://flashpanel.io
/api/servers/{server}/systeminfo
requires authentication

Get server system information (CPU, memory, disk, etc.) via agent.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/systeminfo" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "cpu": {
        "cores": 4,
        "usage": 15.5
    },
    "memory": {
        "total": 8192,
        "used": 4096
    },
    "disk": {
        "total": 100,
        "used": 45
    }
}

List files.

POST
https://flashpanel.io
/api/servers/{server}/files/list
requires authentication

List files and directories in a given path.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/files/list" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/bngz\",
    \"root\": \"\\/bngz\"
}"

Create new directory

POST
https://flashpanel.io
/api/servers/{server}/files/mkdir
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/files/mkdir" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/bngz\",
    \"root\": \"\\/bngz\",
    \"name\": \"architecto\"
}"

Save file content

POST
https://flashpanel.io
/api/servers/{server}/files/save
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
multipart/form-data
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/files/save" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "root=/bngz"\
    --form "new=false"\
    --form "file=@/private/var/folders/qq/kvhmbqts2kjdk_q1d18jdvg80000gn/T/php7aslqkthams8d4eP0mC" 

Delete file or directory

DELETE
https://flashpanel.io
/api/servers/{server}/files/delete
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/files/delete" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": [
        \"\\/bngz\"
    ],
    \"root\": \"\\/bngz\"
}"

View file content

GET
https://flashpanel.io
/api/servers/{server}/files/view
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/files/view" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"root\": \"\\/bngz\",
    \"limit\": 17
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
    "message": "Unauthenticated."
}

Rename file or directory

PUT
https://flashpanel.io
/api/servers/{server}/files/rename
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/files/rename" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/bngz\",
    \"root\": \"\\/bngz\",
    \"name\": \"architecto\"
}"

Compress files/directories

POST
https://flashpanel.io
/api/servers/{server}/files/compress
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/files/compress" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": [
        \"\\/bngz\"
    ],
    \"root\": \"\\/bngz\",
    \"level\": 27,
    \"type\": \"tar.gz\",
    \"name\": \"architecto\"
}"

Decompress archive

POST
https://flashpanel.io
/api/servers/{server}/files/decompress
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/files/decompress" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/bngz\",
    \"root\": \"\\/bngz\",
    \"here\": true
}"

Copy file or directory

POST
https://flashpanel.io
/api/servers/{server}/files/copy
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/files/copy" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/bngz\",
    \"root\": \"\\/bngz\",
    \"destination\": \"\\/bngz\"
}"

Move file or directory

POST
https://flashpanel.io
/api/servers/{server}/files/move
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/files/move" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/bngz\",
    \"root\": \"\\/bngz\",
    \"destination\": \"\\/bngz\"
}"

Change file permissions

POST
https://flashpanel.io
/api/servers/{server}/files/chmod
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/files/chmod" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/bngz\",
    \"root\": \"\\/bngz\",
    \"mode\": \"architecto\"
}"

Change file owner

POST
https://flashpanel.io
/api/servers/{server}/files/chown
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/files/chown" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/bngz\",
    \"root\": \"\\/bngz\",
    \"owner\": \"architecto\",
    \"group\": \"architecto\"
}"

Remove Tiny File Manager.

DELETE
https://flashpanel.io
/api/sites/{site}/tiny-file-manager
requires authentication

Delete the Tiny File Manager from a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/1/tiny-file-manager" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

Firewall & Security

APIs for managing Fail2ban jails

Unban IP addresses.

POST
https://flashpanel.io
/api/servers/{server}/fail2ban/unbanip
requires authentication

Unban one or more IP addresses from a Fail2ban jail.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/fail2ban/unbanip" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"jail\": \"sshd\",
    \"all\": false,
    \"ips\": [
        \"192.168.1.100\"
    ]
}"
Example response:

Enable or disable jail.

POST
https://flashpanel.io
/api/servers/{server}/fail2ban/enable
requires authentication

Enable or disable a Fail2ban jail.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/fail2ban/enable" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"file\": \"\\/etc\\/fail2ban\\/jail.d\\/sshd.conf\",
    \"jail\": \"sshd\",
    \"enable\": true
}"
Example response:

Get Fail2ban info.

POST
https://flashpanel.io
/api/servers/{server}/fail2ban/info
requires authentication

Get available filters and actions for Fail2ban configuration.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/fail2ban/info" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "filters": [
        "sshd",
        "nginx-http-auth"
    ],
    "actions": [
        "iptables-multiport",
        "firewallcmd-ipset"
    ]
}

List Fail2ban jails.

GET
https://flashpanel.io
/api/servers/{server}/fail2ban/jail
requires authentication

Get all configured Fail2ban jails on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/fail2ban/jail" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "name": "sshd",
            "enabled": true,
            "banned_ip_list": []
        }
    ]
}

Create or update jail.

POST
https://flashpanel.io
/api/servers/{server}/fail2ban/jail
requires authentication

Create or update a Fail2ban jail configuration.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/fail2ban/jail" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"file\": \"\\/etc\\/fail2ban\\/jail.d\\/sshd.conf\",
    \"name\": \"sshd\",
    \"enabled\": true,
    \"filter\": \"sshd\",
    \"action\": \"iptables-multiport\",
    \"port\": \"ssh\",
    \"protocol\": \"tcp\",
    \"ignoreip\": [
        \"127.0.0.1\"
    ],
    \"logpath\": \"\\/var\\/log\\/auth.log\",
    \"banaction\": \"iptables-multiport\",
    \"backend\": \"systemd\",
    \"maxretry\": \"5\",
    \"findtime\": \"10m\",
    \"bantime\": \"1h\"
}"
Example response:

Delete jail.

DELETE
https://flashpanel.io
/api/servers/{server}/fail2ban/jail/{jail}
requires authentication

Delete a Fail2ban jail configuration.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
jail
string
required

Jail name.

Example:
sshd
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/fail2ban/jail/sshd" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:

Enable 8G Firewall.

POST
https://flashpanel.io
/api/sites/{site}/8gfirewall
requires authentication

Enable 8G Firewall protection for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/8gfirewall" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
{
    "message": "8G Firewall is only supported for Nginx and Apache"
}

Disable 8G Firewall.

DELETE
https://flashpanel.io
/api/sites/{site}/8gfirewall
requires authentication

Disable 8G Firewall protection for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/1/8gfirewall" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
{
    "message": "8G Firewall is only supported for Nginx and Apache"
}

Firewall Rules

APIs for managing server firewall rules (UFW)

Sync firewall rules.

GET
https://flashpanel.io
/api/servers/{server}/rules/sync
requires authentication

Synchronize firewall rules with the actual server UFW configuration.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/rules/sync" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

List firewall rules.

GET
https://flashpanel.io
/api/servers/{server}/rules
requires authentication

Get all firewall rules configured on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/rules" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "port": "80",
            "type": "allow",
            "protocol": "tcp"
        }
    ]
}

Create firewall rule.

POST
https://flashpanel.io
/api/servers/{server}/rules
requires authentication

Create a new firewall rule on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/rules" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Allow HTTP\",
    \"port\": \"80\",
    \"protocol\": \"tcp\",
    \"type\": \"allow\",
    \"ip_address\": \"192.168.1.0\\/24\"
}"
Example response:
{
    "firewall_rule": {
        "id": 1,
        "port": "80"
    },
    "event": {
        "id": 1,
        "status": "running"
    }
}

Delete firewall rule.

DELETE
https://flashpanel.io
/api/servers/{server}/rules/{rule}
requires authentication

Remove a firewall rule from the server. Cannot delete SSH port rules.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
rule
integer
required

The firewall rule ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/rules/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Linux Users

APIs for managing Linux system users on servers

Sync Linux users.

GET
https://flashpanel.io
/api/servers/{server}/users/sync
requires authentication

Synchronize Linux system users from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/users/sync" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

List Linux users.

GET
https://flashpanel.io
/api/servers/{server}/users
requires authentication

Get all Linux system users on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/users" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "name": "webuser",
            "can_ssh": true,
            "can_ftp": false
        }
    ]
}

Create Linux user.

POST
https://flashpanel.io
/api/servers/{server}/users
requires authentication

Create a new Linux system user on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/users" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"webuser\",
    \"password\": \"SecureP@ss\",
    \"can_ssh\": true,
    \"can_ftp\": false,
    \"block_soft_limit\": \"1G\",
    \"block_hard_limit\": \"2G\",
    \"inode_soft_limit\": 100000,
    \"inode_hard_limit\": 150000
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Update Linux user.

PUT
PATCH
https://flashpanel.io
/api/servers/{server}/users/{user}
requires authentication

Update a Linux user's permissions and quotas.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
user
integer
required

The Linux user ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/users/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"password\": \"NewP@ss123\",
    \"can_ssh\": true,
    \"can_ftp\": false,
    \"block_soft_limit\": \"1G\",
    \"block_hard_limit\": \"2G\",
    \"inode_soft_limit\": 100000,
    \"inode_hard_limit\": 150000
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Delete Linux user.

DELETE
https://flashpanel.io
/api/servers/{server}/users/{user}
requires authentication

Delete a Linux system user from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
user
integer
required

The Linux user ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/users/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Load Balancing

APIs for managing site load balancing

Enable load balancing.

POST
https://flashpanel.io
/api/sites/{site}/balancing/enable
requires authentication

Enable load balancing for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/balancing/enable" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
{
    "message": "There is no load balancer server"
}

Disable load balancing.

POST
https://flashpanel.io
/api/sites/{site}/balancing/disable
requires authentication

Disable load balancing for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/balancing/disable" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Configure load balancing.

POST
https://flashpanel.io
/api/sites/{site}/balancing
requires authentication

Store load balancing configuration for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/balancing" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"method\": \"round_robin\",
    \"servers\": [
        {
            \"ip\": \"192.168.1.10\",
            \"port\": 80,
            \"weight\": 1,
            \"backup\": false,
            \"down\": false
        }
    ]
}"
Example response:
{
    "data": {
        "id": 1,
        "name": "example.com"
    }
}

Mail Server

APIs for managing mail server domains

Check DNS records.

POST
https://flashpanel.io
/api/servers/{server}/mail/domains/{domain}/check
requires authentication

Check and validate DNS records for the mail domain (A, MX, DKIM, DMARC, SPF).

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
domain
integer
required

The mail domain ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/mail/domains/1/check" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

Install SSL for mail domain.

POST
https://flashpanel.io
/api/servers/{server}/mail/domains/{domain}/ssl
requires authentication

Install SSL certificate for the mail server using the domain's certificate.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
domain
integer
required

The mail domain ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/mail/domains/1/ssl" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Set default domain.

POST
https://flashpanel.io
/api/servers/{server}/mail/domains/{domain}/default
requires authentication

Set a mail domain as the default mail domain.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
domain
integer
required

The mail domain ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/mail/domains/1/default" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

List mail domains.

GET
https://flashpanel.io
/api/servers/{server}/mail/domains
requires authentication

Get all mail domains configured on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/mail/domains" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "domain": "example.com",
            "is_default": true
        }
    ]
}

Create mail domain.

POST
https://flashpanel.io
/api/servers/{server}/mail/domains
requires authentication

Create a new mail domain on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/mail/domains" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"domain\": \"example.com\",
    \"subdomain\": \"mail\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Delete mail domain.

DELETE
https://flashpanel.io
/api/servers/{server}/mail/domains/{domain}
requires authentication

Delete a mail domain from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
domain
integer
required

The mail domain ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/mail/domains/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

List mail accounts.

GET
https://flashpanel.io
/api/servers/{server}/mail/accounts
requires authentication

Get all mail accounts on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/mail/accounts" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "accounts": [
        {
            "email": "[email protected]",
            "quota": 1024
        }
    ]
}

Create mail account.

POST
https://flashpanel.io
/api/servers/{server}/mail/accounts
requires authentication

Create a new mail account on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/mail/accounts" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"password\": \"SecureP@ss\",
    \"catch_all\": false,
    \"quota\": \"100M\",
    \"aliases\": [
        \"[email protected]\"
    ]
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Update mail account.

PUT
PATCH
https://flashpanel.io
/api/servers/{server}/mail/accounts/{account}
requires authentication

Update an existing mail account.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
account
string
required

The account.

Example:
architecto
email
string
required

Email address.

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/mail/accounts/architecto" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"password\": \"NewP@ssword\",
    \"catch_all\": false,
    \"quota\": \"200M\",
    \"aliases\": [
        \"[email protected]\"
    ]
}"
Example response:

Delete mail account or alias.

DELETE
https://flashpanel.io
/api/servers/{server}/mail/accounts/{account}
requires authentication

Delete a mail account or remove an alias from an account.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
account
string
required

The account.

Example:
architecto

Body Parameters

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/mail/accounts/architecto" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"alias\": \"[email protected]\"
}"
Example response:

Get mail settings.

GET
https://flashpanel.io
/api/servers/{server}/mail/settings
requires authentication

Retrieve current mail server settings.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/mail/settings" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "ENABLE_POP3": true,
    "ENABLE_MANAGESIEVE": false,
    "ENABLE_FAIL2BAN": true,
    "POSTFIX_MESSAGE_SIZE_LIMIT": 10
}

Update mail settings.

POST
https://flashpanel.io
/api/servers/{server}/mail/settings
requires authentication

Update mail server settings.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/mail/settings" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ENABLE_POP3\": true,
    \"ENABLE_MANAGESIEVE\": false,
    \"ENABLE_FAIL2BAN\": true,
    \"POSTFIX_MESSAGE_SIZE_LIMIT\": 25
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

N8N Automation

APIs for managing N8N automation sites

Restart N8N.

POST
https://flashpanel.io
/api/sites/{site}/n8n/restart
requires authentication

Restart the N8N service.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/restart" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Upgrade N8N.

POST
https://flashpanel.io
/api/sites/{site}/n8n/upgrade
requires authentication

Upgrade N8N to the latest version.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/upgrade" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Reset user management.

POST
https://flashpanel.io
/api/sites/{site}/n8n/user-reset
requires authentication

Reset user management back to pre-setup state.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/user-reset" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Clear license.

POST
https://flashpanel.io
/api/sites/{site}/n8n/license-clear
requires authentication

Clear the N8N license.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/license-clear" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Reset LDAP.

POST
https://flashpanel.io
/api/sites/{site}/n8n/ldap-reset
requires authentication

Reset the LDAP connection.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/ldap-reset" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"option\": \"userId\",
    \"value\": \"user123\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Disable MFA.

POST
https://flashpanel.io
/api/sites/{site}/n8n/mfa-disable
requires authentication

Disable multi-factor authentication for a user.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/mfa-disable" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Get license info.

GET
https://flashpanel.io
/api/sites/{site}/n8n/licence-info
requires authentication

Get N8N license information.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/n8n/licence-info" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "info": "License information..."
}

Export N8N data.

POST
https://flashpanel.io
/api/sites/{site}/n8n/export
requires authentication

Export N8N workflows and/or credentials.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/export" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"workflows\": true,
    \"credentials\": true
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Download backup.

GET
https://flashpanel.io
/api/sites/{site}/n8n/download
requires authentication

Download the N8N data backup file.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/n8n/download" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
File download stream

Get N8N info.

GET
https://flashpanel.io
/api/sites/{site}/n8n/info
requires authentication

Get N8N data info including users, projects, workflows and credentials count.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/n8n/info" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "users": 5,
    "projects": 3,
    "workflows_count": 10,
    "credentials_count": 8
}

Import workflow.

POST
https://flashpanel.io
/api/sites/{site}/n8n/workflows/import
requires authentication

Import a workflow into the N8N instance.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
multipart/form-data
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/workflows/import" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "path=/path/to/workflow.json"\
    --form "remove="\
    --form "file=@/private/var/folders/qq/kvhmbqts2kjdk_q1d18jdvg80000gn/T/phprd8816an3i1n0nw2o87" 
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Bulk activate/deactivate workflows.

POST
https://flashpanel.io
/api/sites/{site}/n8n/workflows/status
requires authentication

Activate or deactivate all workflows at once.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/workflows/status" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"action\": \"active\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Activate workflow.

POST
https://flashpanel.io
/api/sites/{site}/n8n/workflows/{workflow}/active
requires authentication

Set a workflow to active state.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
workflow
string
required

The workflow.

Example:
architecto
id
string
required

The workflow ID.

Example:
abc123

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/workflows/architecto/active" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"My Workflow\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Deactivate workflow.

POST
https://flashpanel.io
/api/sites/{site}/n8n/workflows/{workflow}/inactive
requires authentication

Set a workflow to inactive state.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
workflow
string
required

The workflow.

Example:
architecto
id
string
required

The workflow ID.

Example:
abc123

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/workflows/architecto/inactive" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"My Workflow\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Execute workflow.

POST
https://flashpanel.io
/api/sites/{site}/n8n/workflows/{workflow}/start
requires authentication

Execute a workflow immediately.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
workflow
string
required

The workflow.

Example:
architecto
id
string
required

The workflow ID.

Example:
abc123

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/workflows/architecto/start" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"My Workflow\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Export workflow.

POST
https://flashpanel.io
/api/sites/{site}/n8n/workflows/{workflow}/export
requires authentication

Export a workflow as JSON file.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
workflow
string
required

The workflow.

Example:
architecto
id
string
required

The workflow ID.

Example:
abc123

Query Parameters

name
string

Workflow name for filename.

Example:
My Workflow
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/workflows/architecto/export?name=My+Workflow" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
File download stream

List workflows.

GET
https://flashpanel.io
/api/sites/{site}/n8n/workflows
requires authentication

Get all N8N workflows for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/n8n/workflows" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "1",
            "name": "My Workflow",
            "active": true
        }
    ]
}

Import credential.

POST
https://flashpanel.io
/api/sites/{site}/n8n/credentials/import
requires authentication

Import a credential into the N8N instance.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
multipart/form-data
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/credentials/import" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "path=/path/to/credentials.json"\
    --form "remove="\
    --form "file=@/private/var/folders/qq/kvhmbqts2kjdk_q1d18jdvg80000gn/T/phpo5991id3o0r9ai7prVb" 
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Export credential.

POST
https://flashpanel.io
/api/sites/{site}/n8n/credentials/{credential}/export
requires authentication

Export a credential as JSON file.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
credential
string
required

The credential.

Example:
architecto
id
string
required

The credential ID.

Example:
abc123

Query Parameters

name
string

Credential name for filename.

Example:
API Key
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n/credentials/architecto/export?name=API+Key" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
File download stream

List credentials.

GET
https://flashpanel.io
/api/sites/{site}/n8n/credentials
requires authentication

Get all N8N credentials for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/n8n/credentials" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": "1",
            "name": "API Key",
            "type": "apiKey"
        }
    ]
}

Notifications

APIs for managing site notifications

Disable Telegram notification.

POST
https://flashpanel.io
/api/sites/{site}/notifications/telegram/disable
requires authentication

Disables the Telegram notification for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/notifications/telegram/disable" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

OpenLiteSpeed

APIs for managing OpenLiteSpeed and LSPHP configurations

Get OpenLiteSpeed PHP.ini config.

GET
https://flashpanel.io
/api/servers/{server}/openlitespeed/php.ini
requires authentication

Retrieve PHP.ini configuration for OpenLiteSpeed.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Query Parameters

version
string
required

PHP version.

Example:
php8.3

Body Parameters

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/openlitespeed/php.ini?version=php8.3" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"version\": \"phpbngz\"
}"
Example response:
[
    {
        "key": "memory_limit",
        "value": "256M"
    }
]

Update OpenLiteSpeed PHP.ini config.

POST
https://flashpanel.io
/api/servers/{server}/openlitespeed/php.ini
requires authentication

Update PHP.ini configuration for OpenLiteSpeed.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/openlitespeed/php.ini" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"version\": \"php8.3\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Install LSPHP package.

POST
https://flashpanel.io
/api/servers/{server}/openlitespeed/install
requires authentication

Install OpenLiteSpeed lsphp packages for a PHP version.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/openlitespeed/install" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"version\": \"architecto\"
}"

Get OpenLiteSpeed info.

GET
https://flashpanel.io
/api/servers/{server}/openlitespeed
requires authentication

Get supported and installed PHP versions for OpenLiteSpeed.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/openlitespeed" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "support_versions": [
        "php8.3",
        "php8.2"
    ],
    "installed_versions": [
        "php8.3",
        null
    ]
}

PHP Settings

APIs for managing PHP OPcache settings

Enable OPcache.

POST
https://flashpanel.io
/api/servers/{server}/settings/php/opcache
requires authentication

Enable PHP OPcache for all PHP versions.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/settings/php/opcache" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Disable OPcache.

DELETE
https://flashpanel.io
/api/servers/{server}/settings/php/opcache
requires authentication

Disable PHP OPcache for all PHP versions.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/settings/php/opcache" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Update max upload size.

PUT
https://flashpanel.io
/api/servers/{server}/settings/php/max-upload-size
requires authentication

Update the maximum file upload size for all PHP versions.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/settings/php/max-upload-size" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"max_file_upload_size\": 256
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Update max execution time.

PUT
https://flashpanel.io
/api/servers/{server}/settings/php/max-execution-time
requires authentication

Update the maximum execution time for all PHP versions.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/settings/php/max-execution-time" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"max_execution_time\": 300
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Update PHP CLI version.

PUT
https://flashpanel.io
/api/servers/{server}/php/cli
requires authentication

Update the default PHP CLI version for the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/php/cli" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"version\": \"php8.3\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Enable IonCube.

POST
https://flashpanel.io
/api/servers/{server}/ioncube/enable
requires authentication

Enable IonCube Loader for a PHP version.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/ioncube/enable" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"version\": \"php8.2\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Disable IonCube.

POST
https://flashpanel.io
/api/servers/{server}/ioncube/disable
requires authentication

Disable IonCube Loader for a PHP version.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/ioncube/disable" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"version\": \"php8.2\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Get PHP.ini config.

GET
https://flashpanel.io
/api/servers/{server}/php/ini
requires authentication

Retrieve PHP.ini configuration mapped to predefined config template.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/php/ini" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"cli\",
    \"php_version\": \"phpbngz\"
}"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
    "message": "Unauthenticated."
}

Update PHP.ini config.

POST
https://flashpanel.io
/api/servers/{server}/php/ini
requires authentication

Update PHP.ini configuration on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/php/ini" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"fpm\",
    \"php_version\": \"php8.3\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

PhpMyAdmin

APIs for managing PhpMyAdmin sites

PhpMyAdmin auto login.

GET
https://flashpanel.io
/api/sites/{site}/phpmyadmin/login
requires authentication

Perform a magic (passwordless) login into the phpMyAdmin site.

This endpoint allows users to authenticate with a site without using a password by generating a secure token and redirecting to the site's authentication page.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/101443/phpmyadmin/login" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:

SSH & Keys

APIs for managing SSH keys on Git providers

Add SSH key to Git providers.

POST
https://flashpanel.io
/api/servers/{server}/keys
requires authentication

Add the server's SSH public key to selected Git provider accounts.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/keys" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"providers\": [
        1,
        2
    ]
}"
Example response:
[Empty response]
{
    "message": "Failed to add SSH Key to GitHub"
}

SSH Configuration

APIs for managing SSH daemon configuration

Get SSHD config.

GET
https://flashpanel.io
/api/servers/{server}/sshd_config
requires authentication

Retrieve current SSHD configuration mapped to predefined config template.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/sshd_config" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
    "message": "Unauthenticated."
}

Update SSHD config.

POST
https://flashpanel.io
/api/servers/{server}/sshd_config
requires authentication

Update SSHD configuration on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/sshd_config" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

SSH Keys

APIs for managing SSH keys on servers

List SSH keys.

GET
https://flashpanel.io
/api/servers/{server}/ssh-keys
requires authentication

Get all SSH keys configured on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/ssh-keys" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "name": "My Key",
            "linux_user": "root"
        }
    ]
}

Add SSH key.

POST
https://flashpanel.io
/api/servers/{server}/ssh-keys
requires authentication

Add a new SSH key for a Linux user on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/ssh-keys" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"My Laptop Key\",
    \"user\": \"root\",
    \"public_key\": \"ssh-rsa AAAA...\"
}"
Example response:
{
    "data": {
        "id": 1,
        "name": "My Laptop Key",
        "linux_user": "root"
    }
}

Delete SSH key.

DELETE
https://flashpanel.io
/api/servers/{server}/ssh-keys/{ssh_key}
requires authentication

Remove an SSH key from a Linux user on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
ssh_key
integer
required

The SSH key ID.

Example:
1

Body Parameters

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/ssh-keys/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"linux_user\": \"root\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

SSL Certificates

APIs for managing SSL certificates on sites

Renew certificate.

POST
https://flashpanel.io
/api/sites/{site}/certificates/renew

Renew an SSL certificate on the site.

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/certificates/renew" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 1,
    \"token\": \"architecto\"
}"
Example response:
[Empty response]

Install free certificate.

POST
https://flashpanel.io
/api/sites/{site}/certificates/free
requires authentication

Install a free SSL certificate (Let's Encrypt or ZeroSSL) on the site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/certificates/free" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"client\": \"letsencrypt\",
    \"auto_active\": true,
    \"account\": \"default\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Create Certificate Signing Request

POST
https://flashpanel.io
/api/sites/{site}/certificates/csr
requires authentication

Creates a Certificate Signing Request (CSR) to purchase an SSL certificate.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/csr" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"city\": \"architecto\",
    \"country\": \"ng\",
    \"department\": \"architecto\",
    \"domain\": \"architecto\",
    \"organization\": \"architecto\",
    \"state\": \"architecto\"
}"

Import certificate

POST
https://flashpanel.io
/api/sites/{site}/certificates/import
requires authentication

Imports an existing SSL certificate for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/import" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"certificate_key\": \"architecto\",
    \"certificate_cert\": \"architecto\",
    \"auto_active\": false
}"

Clone certificate

POST
https://flashpanel.io
/api/sites/{site}/certificates/{certificate}/clone
requires authentication

Clones a certificate from one of the SSL certificates installed for the websites on the servers of your VPS system.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443
certificate
string
required

The certificate.

Example:
architecto
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/architecto/clone" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Installs a private key for a CSR.

POST
https://flashpanel.io
/api/sites/{site}/certificates/{certificate}/install
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443
certificate
integer
required

The certificate.

Example:
101126

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/101126/install" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"certificate_cert\": \"architecto\"
}"

Activate certificate

POST
https://flashpanel.io
/api/sites/{site}/certificates/{certificate}/active
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443
certificate
integer
required

The certificate.

Example:
101126
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/101126/active" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Deactivate certificate.

POST
https://flashpanel.io
/api/sites/{site}/certificates/{certificate}/inactive
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443
certificate
integer
required

The certificate.

Example:
101126
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/101126/inactive" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

List certificates.

GET
https://flashpanel.io
/api/sites/{site}/certificates
requires authentication

Get all SSL certificates installed on a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/certificates" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "domain": "example.com",
            "is_active": true,
            "is_free": true
        }
    ]
}

Install new certificate

POST
https://flashpanel.io
/api/sites/{site}/certificates
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"client\": \"architecto\"
}"

Delete certificate.

DELETE
https://flashpanel.io
/api/sites/{site}/certificates/{certificate}
requires authentication

Remove an SSL certificate from the site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
certificate
integer
required

The certificate ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/1/certificates/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Schedules & Cron

APIs for managing server cron jobs and scheduled tasks

Get schedule script.

GET
https://flashpanel.io
/api/servers/{server}/schedules/{schedule}/script

Download the shell script for a system schedule.

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
schedule
integer
required

The schedule ID.

Example:
1

Query Parameters

token
string
required

Backup token.

Example:
abc123
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/schedules/1/script?token=abc123" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Shell script file download
{
    "message": "Only system schedules can access this endpoint"
}

List schedules.

GET
https://flashpanel.io
/api/servers/{server}/schedules
requires authentication

Retrieve all cron jobs configured on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/schedules" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "command": "php artisan schedule:run",
            "cron": "* * * * *",
            "user": "root"
        }
    ]
}

Create schedule.

POST
https://flashpanel.io
/api/servers/{server}/schedules
requires authentication

Create a new cron job on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/schedules" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"command\": \"php \\/home\\/user\\/app\\/artisan schedule:run\",
    \"user\": \"root\",
    \"cron\": \"* * * * *\",
    \"description\": \"Laravel scheduler\"
}"
Example response:
{
    "schedule": {
        "id": 1,
        "command": "..."
    },
    "event": {
        "id": 1,
        "status": "running"
    }
}

Update schedule.

PUT
PATCH
https://flashpanel.io
/api/servers/{server}/schedules/{schedule}
requires authentication

Update an existing cron job on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
schedule
integer
required

The schedule ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/schedules/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"command\": \"php \\/home\\/user\\/app\\/artisan schedule:run\",
    \"user\": \"root\",
    \"cron\": \"0 * * * *\",
    \"description\": \"Laravel scheduler\"
}"
Example response:
{
    "schedule": {
        "id": 1,
        "command": "..."
    },
    "event": {
        "id": 1,
        "status": "running"
    }
}

Delete schedule.

DELETE
https://flashpanel.io
/api/servers/{server}/schedules/{schedule}
requires authentication

Delete a cron job from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
schedule
integer
required

The schedule ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/schedules/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Server Agent

APIs for managing server agent installation and communication

Install agent.

POST
https://flashpanel.io
/api/servers/{server}/agent/install
requires authentication

Install or update the FlashPanel agent on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/agent/install" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"web\": true
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
{
    "message": "Agent is already up to date"
}

Generate agent token.

POST
https://flashpanel.io
/api/servers/{server}/agent/token
requires authentication

Generate a token for connecting with the server agent.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/agent/token" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "token": "jwt_token",
    "direct": "direct_token",
    "remote": "encrypted_key"
}

Server Management

APIs for managing VPS servers

Decrypt data.

GET
https://flashpanel.io
/api/servers/{server}/decrypt

Decrypt encrypted data using server token.

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Query Parameters

token
string
required

The decrypt token.

Example:
abc123
data
string
required

The encrypted data.

Example:
encrypted-string
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/decrypt?token=abc123&data=encrypted-string" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "decrypted": "data"
}

List all servers.

GET
https://flashpanel.io
/api/servers
requires authentication

Get a list of all servers owned by the authenticated user.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

search
string

Filter by server name or ID.

Example:
my-server
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers?search=my-server" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "name": "my-server",
            "ip": "192.168.1.1",
            "status": "active"
        }
    ]
}

Create a new server.

POST
https://flashpanel.io
/api/servers
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
multipart/form-data
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "provider=custom"\
    --form "name=server01"\
    --form "custom_script=123"\
    --form "customProvider=architecto"\
    --form "ip=192.168.1.100"\
    --form "ssh_port=22"\
    --form "auth_password=1"\
    --form "ssh_password=RootP@ss123"\
    --form "ssh_passphrase=KeyP@ss"\
    --form "notCustomProvider=architecto"\
    --form "plan=vc2-1c-1gb"\
    --form "region=sgp"\
    --form "credential=5"\
    --form "ssh_private_key=@/private/var/folders/qq/kvhmbqts2kjdk_q1d18jdvg80000gn/T/phpoilpfhgcfta78Uxk1FM" 

Get server details.

GET
https://flashpanel.io
/api/servers/{server}
requires authentication

Retrieve detailed information about a specific server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 1,
        "name": "my-server",
        "ip": "192.168.1.1",
        "status": "active"
    }
}

Delete a server.

DELETE
https://flashpanel.io
/api/servers/{server}
requires authentication

Remove a server from the system.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Query Parameters

provider
boolean

Also delete server at VPS provider.

Example:
true
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1?provider=1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

Get server system information.

POST
https://flashpanel.io
/api/servers/{server}/info
requires authentication

Retrieve system information about the server such as CPU, RAM, DISK, CORE, Swap, etc.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/info" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Toggle server favorite.

POST
https://flashpanel.io
/api/servers/{server}/favorite
requires authentication

Toggle the favorite status of a server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/favorite" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

Change server name.

PUT
https://flashpanel.io
/api/servers/{server}/name
requires authentication

Update the server display name. The system will also change the VPS hostname and label at the VPS provider if applicable.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/name" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"my-new-server\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Change server IP address.

PUT
https://flashpanel.io
/api/servers/{server}/ip
requires authentication

Update the IP address of a server. This is useful when the VPS IP address has changed.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/ip" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ip\": \"192.168.1.100\"
}"
Example response:
[Empty response]

Run hotfix.

POST
https://flashpanel.io
/api/servers/{server}/hotfix
requires authentication

Execute available hotfixes for the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/hotfix" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "events": []
}

Sync backup configuration.

POST
https://flashpanel.io
/api/servers/{server}/sync-backup-configuration
requires authentication

Synchronize backup scripts with the latest configuration.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/sync-backup-configuration" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

Toggle server protection.

POST
https://flashpanel.io
/api/servers/{server}/protect
requires authentication

Enable or disable server protection to prevent accidental deletion.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/protect" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"protected\": true
}"
Example response:
{
    "data": {
        "id": 1,
        "name": "my-server",
        "protected": true
    }
}

Update server tags.

PUT
https://flashpanel.io
/api/servers/{server}/tags
requires authentication

Update the tags associated with a server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/tags" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tags\": [
        \"production\",
        \"web\"
    ]
}"
Example response:
{
    "data": {
        "id": 1,
        "name": "my-server",
        "tags": [
            "production",
            "web"
        ]
    }
}

Clean system.

POST
https://flashpanel.io
/api/servers/{server}/clean
requires authentication

Clean unnecessary files like system logs and application cache from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/clean" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"schedule\": \"0 0 * * *\"
}"
Example response:
{
    "events": [
        {
            "id": 1,
            "status": "running"
        }
    ]
}

Run server action.

POST
https://flashpanel.io
/api/servers/{server}/action
requires authentication

Execute a predefined action script on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/action" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"action\": \"restart-nginx\",
    \"note\": \"Restarting Nginx\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Share server.

POST
https://flashpanel.io
/api/servers/{server}/share
requires authentication

Share the server access with teams.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/share" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"teams\": [
        1,
        2
    ]
}"
Example response:

Grant root access.

POST
https://flashpanel.io
/api/servers/{server}/grant-root
requires authentication

Re-grant root access to the server by updating the SSH private key.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/grant-root" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"private_key\": \"-----BEGIN OPENSSH PRIVATE KEY-----\\\\n...\",
    \"password\": \"MyP@ssw0rd\"
}"
Example response:
[Empty response]

Restart server.

POST
https://flashpanel.io
/api/servers/{server}/restart/normal
requires authentication

Perform a normal (soft) restart on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/restart/normal" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
{
    "message": "You can only restart the server once every 2 minutes"
}

Hard restart server.

POST
https://flashpanel.io
/api/servers/{server}/restart/hard
requires authentication

Perform a hard (forced) restart via VPS provider API.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/restart/hard" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Reinstall server.

POST
https://flashpanel.io
/api/servers/{server}/reinstall
requires authentication

Reinstall the server OS via VPS provider API.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/reinstall" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 1,
        "name": "Web Server 01"
    }
}
{
    "message": "Reinstall is not supported for this provider"
}

Change user password.

PUT
https://flashpanel.io
/api/servers/{server}/password
requires authentication

Update the password for a Linux user on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/password" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user\": \"root\",
    \"password\": \"newP@ssw0rd\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Server Settings

APIs for managing server timezone

List timezones.

GET
https://flashpanel.io
/api/servers/{server}/timezone
requires authentication

Get all available timezone identifiers.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/timezone" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[
    "America/New_York",
    "Asia/Ho_Chi_Minh",
    "Europe/London"
]

Update timezone.

POST
https://flashpanel.io
/api/servers/{server}/timezone
requires authentication

Update the server timezone.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/timezone" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"timezone\": \"Asia\\/Ho_Chi_Minh\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Get default page.

GET
https://flashpanel.io
/api/servers/{server}/default-page
requires authentication

Get the default page HTML template for new sites.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/default-page" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "default_page": "<html>...</html>"
}

Update default page.

POST
https://flashpanel.io
/api/servers/{server}/default-page
requires authentication

Update the default page HTML template for new sites.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/default-page" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"default_page\": \"<html><body>Welcome<\\/body><\\/html>\"
}"
Example response:
[Empty response]

List common ports.

GET
https://flashpanel.io
/api/servers/{server}/ports
requires authentication

Get list of common server port configurations.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/ports" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[
    {
        "id": 1,
        "name": "HTTP",
        "port": 80
    },
    {
        "id": 2,
        "name": "HTTPS",
        "port": 443
    }
]

Server Transfer

APIs for managing server ownership transfers

List server transfers.

GET
https://flashpanel.io
/api/servers-transfer
requires authentication

Get all server transfers (sent and received) for the current user.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers-transfer" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "server": {
                "id": 1,
                "name": "Web Server"
            },
            "status": "pending"
        }
    ]
}

Create server transfer.

POST
https://flashpanel.io
/api/servers-transfer
requires authentication

Transfer server ownership to another user.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers-transfer" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"to_id\": \"[email protected]\",
    \"server_id\": 1
}"
Example response:
{
    "message": "Success"
}
{
    "message": "You can't transfer server to yourself"
}
{
    "message": "This user is not eligible to receive your server"
}

Update transfer status.

PUT
PATCH
https://flashpanel.io
/api/servers-transfer/{servers_transfer}
requires authentication

Update the status of a server transfer (approve/reject/cancel).

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

servers_transfer
integer
required

The server transfer ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers-transfer/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"approved\"
}"
Example response:
{
    "message": "Update Success"
}

Services

APIs for managing custom systemd services on servers

Status of a service.

POST
https://flashpanel.io
/api/servers/{server}/services/status
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/services/status" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"services\": [
        \"architecto\"
    ]
}"

Synchronizes a VPS service with the server.

POST
https://flashpanel.io
/api/servers/{server}/services/sync
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/services/sync" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\"
}"

List services.

GET
https://flashpanel.io
/api/servers/{server}/services
requires authentication

Get all custom systemd services on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/services" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "name": "myservice",
            "enabled": true
        }
    ],
    "infos": {}
}

Create service.

POST
https://flashpanel.io
/api/servers/{server}/services
requires authentication

Create a new custom systemd service on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/services" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"myservice\",
    \"unit\": {
        \"Description\": \"My Service\"
    },
    \"service\": {
        \"ExecStart\": \"\\/usr\\/bin\\/myapp\"
    },
    \"install\": {
        \"WantedBy\": \"multi-user.target\"
    },
    \"enabled\": true
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Update service.

PUT
PATCH
https://flashpanel.io
/api/servers/{server}/services/{service}
requires authentication

Update a custom systemd service configuration.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
service
integer
required

The service ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/services/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"unit\": {
        \"Description\": \"My Service\"
    },
    \"service\": {
        \"ExecStart\": \"\\/usr\\/bin\\/myapp\"
    },
    \"install\": {
        \"WantedBy\": \"multi-user.target\"
    },
    \"enabled\": true
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Delete service.

DELETE
https://flashpanel.io
/api/servers/{server}/services/{service}
requires authentication

Remove a custom systemd service from the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
service
integer
required

The service ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/services/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Services & Daemons

APIs for managing systemd service actions (start/stop/restart/enable/disable)

Start service.

POST
https://flashpanel.io
/api/servers/{server}/services/{service}/start
requires authentication

Start a systemd service.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
service
integer
required

The service ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/services/1/start" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Stop service.

POST
https://flashpanel.io
/api/servers/{server}/services/{service}/stop
requires authentication

Stop a systemd service.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
service
integer
required

The service ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/services/1/stop" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Restart service.

POST
https://flashpanel.io
/api/servers/{server}/services/{service}/restart
requires authentication

Restart a systemd service.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
service
integer
required

The service ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/services/1/restart" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Enable service.

POST
https://flashpanel.io
/api/servers/{server}/services/{service}/enable
requires authentication

Enable a systemd service to start automatically at boot.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
service
integer
required

The service ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/services/1/enable" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Disable service.

POST
https://flashpanel.io
/api/servers/{server}/services/{service}/disable
requires authentication

Disable a systemd service from starting automatically at boot.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
service
integer
required

The service ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/services/1/disable" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

List PM2 processes.

GET
https://flashpanel.io
/api/servers/{server}/pm2
requires authentication

Get all running PM2 processes on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/pm2" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "processes": [
        {
            "id": 0,
            "name": "app",
            "status": "online",
            "cpu": 0.5,
            "memory": 52428800
        }
    ],
    "installed": true
}

Start PM2 process.

POST
https://flashpanel.io
/api/servers/{server}/pm2/start
requires authentication

Start a new PM2 process on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/pm2/start" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user\": \"www-data\",
    \"command\": \"npm start\"
}"
Example response:

Stop PM2 process.

POST
https://flashpanel.io
/api/servers/{server}/pm2/stop
requires authentication

Stop a running PM2 process.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/pm2/stop" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user\": \"www-data\",
    \"process\": 0
}"
Example response:
{
    "output": "Process stopped",
    "success": true
}

Restart PM2 process.

POST
https://flashpanel.io
/api/servers/{server}/pm2/restart
requires authentication

Restart a running PM2 process.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/pm2/restart" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user\": \"www-data\",
    \"process\": 0
}"
Example response:
{
    "output": "Process restarted",
    "success": true
}

Delete PM2 process.

POST
https://flashpanel.io
/api/servers/{server}/pm2/delete
requires authentication

Delete a PM2 process from the process list.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/pm2/delete" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user\": \"www-data\",
    \"process\": 0
}"
Example response:
{
    "output": "Process deleted",
    "success": true
}

Get PM2 logs.

POST
https://flashpanel.io
/api/servers/{server}/pm2/logs
requires authentication

Get logs for a PM2 process.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Query Parameters

process
integer
required

Process ID.

Example:
0
user
string
required

Linux user running the process.

Example:
www-data

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/pm2/logs?process=0&user=www-data" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user\": \"architecto\",
    \"process\": 4326.41688,
    \"lines\": 17
}"
Example response:
{
    "output": "[PM2] Logs...",
    "success": true
}

Site Management

APIs for managing websites/sites on servers

Verify the token for auto login to WordPress.

GET
POST
PUT
PATCH
DELETE
OPTIONS
https://flashpanel.io
/api/sites/{site}/verify

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/101443/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
{
    "success": false,
    "message": "Bad request: bad data"
}

List all sites.

GET
https://flashpanel.io
/api/sites
requires authentication

Get a list of all sites owned by the authenticated user.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "name": "example.com",
            "enabled": true
        }
    ]
}

Calculate site data usage.

GET
https://flashpanel.io
/api/servers/{server}/sites/usage
requires authentication

Calculate disk usage for all sites on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/sites/usage" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Create a new site.

POST
https://flashpanel.io
/api/sites
requires authentication

Create a new website on a server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"server_id\": 1,
    \"site_id\": 10,
    \"name\": \"example.com\",
    \"php_version\": \"php8.3\",
    \"proxy_port\": 3000,
    \"database_name\": \"mydb\",
    \"wildcards\": false,
    \"username\": \"myuser\",
    \"password\": \"secret123\"
}"
Example response:
{
    "data": {
        "id": 1,
        "name": "example.com",
        "enabled": true
    }
}

Get site details.

GET
https://flashpanel.io
/api/sites/{site}
requires authentication

Retrieve detailed information about a specific site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 1,
        "name": "example.com",
        "enabled": true
    }
}

Delete a site.

DELETE
https://flashpanel.io
/api/sites/{site}
requires authentication

Remove a site and optionally its associated database/user.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"database\": true,
    \"database_user\": true
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Generate a JWT token for the agent associated with the given Site.

POST
https://flashpanel.io
/api/sites/{site}/agent/token
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/agent/token" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Check DNS records.

POST
https://flashpanel.io
/api/sites/{site}/ip-remote-check
requires authentication

Verify that the site's DNS A records point to the correct server IP.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/ip-remote-check" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[
    {
        "domain": "example.com",
        "ip": "192.168.1.1",
        "success": true
    }
]

Update site name.

PUT
https://flashpanel.io
/api/sites/{site}/name
requires authentication

Change the domain name and related settings of a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/1/name" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"newdomain.com\",
    \"wildcards\": false,
    \"enable_redirect\": true,
    \"enable_redirect_ssl\": true,
    \"preferred_url\": \"www\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
[Empty response]

Toggle site favorite.

POST
https://flashpanel.io
/api/sites/{site}/favorite
requires authentication

Toggle the favorite status of a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/favorite" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]

Clone site.

POST
https://flashpanel.io
/api/sites/{site}/clone
requires authentication

Create copies of a site to the same or different server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/clone" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"server_id\": 1,
    \"sites\": [
        \"clone1.com\",
        \"clone2.com\"
    ],
    \"database\": false,
    \"deploy_script\": true
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Uninstall code.

DELETE
https://flashpanel.io
/api/sites/{site}/uninstall
requires authentication

Uninstall the source code from a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/1/uninstall" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reset\": true,
    \"delete_database\": false,
    \"delete_database_user\": false
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Change the permissions of a file or folder in a site.

POST
https://flashpanel.io
/api/sites/{site}/chmod
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/chmod" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"folder\": \"b\",
    \"file\": \"n\"
}"

Change the ownership of the root folder of a site.

POST
https://flashpanel.io
/api/sites/{site}/chown
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/chown" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Enable or Disable site

POST
https://flashpanel.io
/api/sites/{site}/toggle
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/toggle" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"enabled\": true
}"

Toggle site protection

POST
https://flashpanel.io
/api/sites/{site}/protect
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/protect" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"protected\": false
}"

Updates the owner of the site.

PUT
https://flashpanel.io
/api/sites/{site}/owner
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/owner" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"b\"
}"

Run a code action

POST
https://flashpanel.io
/api/sites/{site}/action
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/action" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"action\": \"architecto\",
    \"note\": \"architecto\"
}"

Link a resources to a site.

POST
https://flashpanel.io
/api/sites/{site}/bindings
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/bindings" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"database\": 16,
    \"user\": 16
}"

Toggle Lockdown protection

POST
https://flashpanel.io
/api/sites/{site}/lockdown
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site.

Example:
101443

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/lockdown" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"enable\": true
}"

Update web directory.

PUT
https://flashpanel.io
/api/sites/{site}/directory
requires authentication

Change the web root directory of a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/1/directory" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"directory\": \"\\/public\",
    \"sync\": true
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
[Empty response]

Update git branch.

PUT
https://flashpanel.io
/api/sites/{site}/branch
requires authentication

Change the git branch for the site deployment.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/1/branch" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"branch\": \"main\"
}"
Example response:
[Empty response]

Update PHP version.

PUT
https://flashpanel.io
/api/sites/{site}/php_version
requires authentication

Update the PHP version for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/1/php_version" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"php_version\": \"php8.3\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
[Empty response]

Update site type.

PUT
https://flashpanel.io
/api/sites/{site}/type
requires authentication

Change the code type of a site (custom, laravel, wordpress).

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/1/type" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"laravel\"
}"
Example response:
[Empty response]

Update proxy port.

PUT
https://flashpanel.io
/api/sites/{site}/proxy_port
requires authentication

Update the reverse proxy port for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/1/proxy_port" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"proxy_port\": 3000
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
[Empty response]

Install phpMyAdmin.

POST
https://flashpanel.io
/api/sites/{site}/phpmyadmin
requires authentication

Install phpMyAdmin on a site for database management.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/phpmyadmin" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Install WordPress.

POST
https://flashpanel.io
/api/sites/{site}/wordpress
requires authentication

Install WordPress on a site with automatic database setup.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/wordpress" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"version\": \"latest\",
    \"title\": \"My Blog\",
    \"username\": \"admin\",
    \"password\": \"SecureP@ss\",
    \"email\": \"[email protected]\",
    \"searchEngineOff\": false,
    \"user\": 1,
    \"database\": 1,
    \"scripts\": \"wp plugin install akismet\"
}"
Example response:
{
    "event": {
        "id": 1,
        "status": "running"
    }
}

Install Roundcube.

POST
https://flashpanel.io
/api/sites/{site}/roundcube
requires authentication

Install Roundcube Webmail on a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/roundcube" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"mysql\",
    \"imap_host\": [
        \"ssl:\\/\\/mail.domain.tld:993\"
    ],
    \"smtp_host\": [
        \"ssl:\\/\\/mail.domain.tld:465\"
    ],
    \"user\": \"roundcube_user\",
    \"database\": \"roundcube_db\"
}"

Install GitHub repository.

POST
https://flashpanel.io
/api/sites/{site}/github
requires authentication

Install Git code from GitHub repository.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/github" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"orgName\": \"my-org\",
    \"repository\": \"[email protected]:user\\/repo.git\",
    \"branch\": \"main\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Install GitLab repository.

POST
https://flashpanel.io
/api/sites/{site}/gitlab
requires authentication

Install Git code from GitLab repository.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/gitlab" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"repository\": \"[email protected]:user\\/repo.git\",
    \"branch\": \"main\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Install Bitbucket repository.

POST
https://flashpanel.io
/api/sites/{site}/bitbucket
requires authentication

Install Git code from Bitbucket repository.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/bitbucket" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"repository\": \"[email protected]:user\\/repo.git\",
    \"branch\": \"main\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Install Git repository.

POST
https://flashpanel.io
/api/sites/{site}/git
requires authentication

Clone a Git repository to the site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/git" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"repository\": \"[email protected]:user\\/repo.git\",
    \"branch\": \"main\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Install Uptime Kuma.

POST
https://flashpanel.io
/api/sites/{site}/uptime-kuma
requires authentication

Install Uptime Kuma monitoring tool on the site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/uptime-kuma" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"port\": 3001
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Install Imunify Antivirus.

POST
https://flashpanel.io
/api/sites/{site}/imunifyav
requires authentication

Install Imunify Antivirus dashboard on the site. Requires Imunify360 to be installed on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/imunifyav" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Install Chatwoot.

POST
https://flashpanel.io
/api/sites/{site}/chatwoot
requires authentication

Install Chatwoot customer support platform on the site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/chatwoot" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"port\": 3000
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Install N8N.

POST
https://flashpanel.io
/api/sites/{site}/n8n
requires authentication

Install N8N workflow automation on the site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/n8n" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"port\": 5678,
    \"database\": \"postgresql\",
    \"env\": \"N8N_BASIC_AUTH_ACTIVE=true\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Sync web server config.

POST
https://flashpanel.io
/api/sites/{site}/sync
requires authentication

Synchronize the web server configuration for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/sync" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Site Settings

APIs for updating site Git repository

Update repository.

PUT
https://flashpanel.io
/api/sites/{site}/repository
requires authentication

Update the Git repository for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/1/repository" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"provider\": \"github\",
    \"repository\": \"[email protected]:user\\/repo.git\",
    \"branch\": \"main\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

List web server configs.

GET
https://flashpanel.io
/api/sites/{site}/configs
requires authentication

Get all web server configurations for a site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Query Parameters

webserver
string
required

Web server type: nginx or apache2.

Example:
nginx

Body Parameters

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/configs?webserver=nginx" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"webserver\": \"architecto\"
}"
Example response:
{
    "data": [
        {
            "id": 1,
            "name": "Custom config",
            "position": "before"
        }
    ]
}

Create web server config.

POST
https://flashpanel.io
/api/sites/{site}/configs
requires authentication

Add a custom web server configuration rule.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/configs" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"custom\",
    \"webserver\": \"nginx\",
    \"name\": \"My custom rule\",
    \"position\": \"before\",
    \"content\": \"add_header X-Frame-Options \\\"SAMEORIGIN\\\";\",
    \"from\": \"^\\/old-path$\",
    \"to\": \"\\/new-path\",
    \"flag\": \"permanent\",
    \"path\": \"\\/admin\",
    \"users\": [
        {
            \"username\": \"admin\",
            \"password\": \"pass123\"
        }
    ]
}"
Example response:
[Empty response]

Update web server config.

PUT
PATCH
https://flashpanel.io
/api/sites/{site}/configs/{config}
requires authentication

Update an existing web server configuration rule.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
config
integer
required

The config ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/1/configs/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"custom\",
    \"webserver\": \"nginx\",
    \"name\": \"Updated rule\",
    \"content\": \"add_header X-Custom \\\"value\\\";\"
}"
Example response:
[Empty response]

Delete web server config.

DELETE
https://flashpanel.io
/api/sites/{site}/configs/{config}
requires authentication

Delete a web server configuration rule.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
config
integer
required

The config ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/1/configs/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[Empty response]
{
    "message": "Cannot delete this web server config"
}

Supervisor

APIs for managing Supervisor process manager configurations

Get Supervisor log.

GET
https://flashpanel.io
/api/servers/{server}/supervisor/{supervisor}/log
requires authentication

Retrieve the last 500 lines of the Supervisor process log.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
supervisor
integer
required

The Supervisor config ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/supervisor/1/log" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
"log content here..."

Retrieves the status of a Supervisor.

GET
https://flashpanel.io
/api/servers/{server}/supervisor/{supervisor}/status
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
supervisor
integer
required

The supervisor.

Example:
3
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/supervisor/3/status" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
    "message": "Unauthenticated."
}

Clear Supervisor log.

POST
https://flashpanel.io
/api/servers/{server}/supervisor/{supervisor}/clear-log
requires authentication

Clear the Supervisor process log file.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
supervisor
integer
required

The Supervisor config ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/supervisor/1/clear-log" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
""

Restarts the Supervisor configuration.

POST
https://flashpanel.io
/api/servers/{server}/supervisor/{supervisor}/restart
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
supervisor
integer
required

The supervisor.

Example:
3
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/supervisor/3/restart" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Starts the Supervisor configuration.

POST
https://flashpanel.io
/api/servers/{server}/supervisor/{supervisor}/start
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
supervisor
integer
required

The supervisor.

Example:
3
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/supervisor/3/start" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Stops a Supervisor.

POST
https://flashpanel.io
/api/servers/{server}/supervisor/{supervisor}/stop
requires authentication

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server.

Example:
282
supervisor
integer
required

The supervisor.

Example:
3
Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/supervisor/3/stop" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Create Supervisor config.

POST
https://flashpanel.io
/api/servers/{server}/supervisor
requires authentication

Create a new Supervisor process configuration.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/supervisor" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Laravel Queue Worker\",
    \"command\": \"php \\/home\\/site\\/artisan queue:work\",
    \"directory\": \"\\/home\\/site\",
    \"user\": \"flashvps\",
    \"processes\": 2,
    \"start_secs\": 1
}"
Example response:
{
    "id": 1,
    "status": "installing",
    "command": "php artisan queue:work"
}

Delete Supervisor config.

DELETE
https://flashpanel.io
/api/servers/{server}/supervisor/{supervisor}
requires authentication

Remove a Supervisor process configuration.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
supervisor
integer
required

The Supervisor config ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/supervisor/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": 1,
    "status": "deleting"
}

WireGuard VPN

APIs for managing WireGuard VPN clients

Download client config.

GET
https://flashpanel.io
/api/servers/{server}/wireguard/{wireguard}/download
requires authentication

Download the WireGuard configuration file for a client.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
wireguard
integer
required

The WireGuard client ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/wireguard/1/download" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
File download stream

List WireGuard clients.

GET
https://flashpanel.io
/api/servers/{server}/wireguard
requires authentication

Get the list of WireGuard VPN clients.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/wireguard" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": [
        {
            "id": 1,
            "client_name": "client1",
            "address": "10.8.0.2"
        }
    ]
}

Create WireGuard client.

POST
https://flashpanel.io
/api/servers/{server}/wireguard
requires authentication

Creates a new WireGuard VPN client.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/wireguard" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"client_name\": \"client1\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Delete WireGuard client.

DELETE
https://flashpanel.io
/api/servers/{server}/wireguard/{wireguard}
requires authentication

Remove a client from the WireGuard VPN.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
wireguard
integer
required

The WireGuard client ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/wireguard/1" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

WordPress

APIs for managing WordPress auto login feature

Uninstall auto login.

DELETE
https://flashpanel.io
/api/servers/{server}/wordpress/auto-login
requires authentication

Remove the auto login plugin from all WordPress sites on the server.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

server
integer
required

The server ID.

Example:
1
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/wordpress/auto-login" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:

Get WordPress info.

GET
https://flashpanel.io
/api/sites/{site}/wordpress
requires authentication

Get WordPress plugins and themes information.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Query Parameters

type
string
required

Type: plugins or themes.

Example:
plugins

Body Parameters

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/wordpress?type=plugins" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"plugins\"
}"
Example response:
{
    "plugins": [
        {
            "name": "Akismet",
            "status": "active",
            "version": "5.0"
        }
    ]
}

Toggle auto-update.

POST
https://flashpanel.io
/api/sites/{site}/wordpress/{type}/auto-update
requires authentication

Enable or disable auto-update for a WordPress plugin or theme.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
type
string
required

Type: plugins or themes.

Example:
plugins

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/wordpress/plugins/auto-update" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"enable\": true,
    \"plugin\": \"akismet\"
}"
Example response:

Toggle plugin/theme.

POST
https://flashpanel.io
/api/sites/{site}/wordpress/{type}/toggle
requires authentication

Activate or deactivate a WordPress plugin or theme.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
type
string
required

Type: plugins or themes.

Example:
plugins

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/wordpress/plugins/toggle" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"enable\": true,
    \"plugin\": \"akismet\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}
POST
https://flashpanel.io
/api/sites/{site}/wordpress/{type}/search
requires authentication

Search for WordPress plugins or themes from the WordPress.org repository.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
type
string
required

Type: plugins or themes.

Example:
plugins

Query Parameters

search
string
required

Search query.

Example:
seo

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/wordpress/plugins/search?search=seo" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"search\": \"architecto\"
}"
Example response:

Install plugin/theme.

POST
https://flashpanel.io
/api/sites/{site}/wordpress/{type}/install
requires authentication

Install a WordPress plugin or theme from the WordPress.org repository.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
type
string
required

Type: plugins or themes.

Example:
plugins

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/wordpress/plugins/install" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"plugin\": \"wordpress-seo\",
    \"version\": \"21.0\",
    \"activate\": true
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Update plugin/theme.

POST
https://flashpanel.io
/api/sites/{site}/wordpress/{type}/update
requires authentication

Update a WordPress plugin or theme to the latest version.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
type
string
required

Type: plugins or themes.

Example:
plugins

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/wordpress/plugins/update" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"plugin\": \"wordpress-seo\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Delete plugin/theme.

POST
https://flashpanel.io
/api/sites/{site}/wordpress/{type}/delete
requires authentication

Delete a WordPress plugin or theme.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
type
string
required

Type: plugins or themes.

Example:
plugins

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/wordpress/plugins/delete" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"plugin\": \"hello-dolly\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Optimize WordPress.

POST
https://flashpanel.io
/api/sites/{site}/wordpress/optimization
requires authentication

Optimize WordPress according to the desired optimization conditions.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/wordpress/optimization" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"optimizations\": [
        \"cache flush\",
        \"transient delete --all\"
    ]
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Get optimization log.

GET
https://flashpanel.io
/api/sites/{site}/wordpress/optimization/log
requires authentication

Retrieves the optimization log for a WordPress site.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/wordpress/optimization/log" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "time": "2 hours ago",
    "log": "Optimization completed successfully"
}
{
    "time": null,
    "log": null
}

Toggle WP Rocket.

POST
https://flashpanel.io
/api/sites/{site}/wordpress/wprocket
requires authentication

Enable or disable WordPress Rocket cache integration with Nginx.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/wordpress/wprocket" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"enable\": true
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Update WordPress user.

PUT
https://flashpanel.io
/api/sites/{site}/wordpress/user
requires authentication

Updates the WordPress admin user credentials.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/1/wordpress/user" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"wp_user\": \"admin\",
    \"wp_password\": \"SecureP@ss123\"
}"
Example response:
{
    "data": {
        "id": 21449,
        "description": "xxx",
        "status": "RUNNING",
        "total_seconds": 0.848489,
        "created_at": "2025-12-04T06:06:45.000000Z",
        "created_at_display": "0 giây trước",
        "updated_at": "2025-12-04T06:06:45.000000Z",
        "output": "xxx",
        "user_id": 1,
        "server_id": 384,
        "site_id": null,
        "color": "info",
        "is_finished": false,
        "user_name": "User Name",
        "user_avatar": "https://example.com/avatar.png",
        "type": "xxx"
    }
}

Magic login.

GET
https://flashpanel.io
/api/sites/{site}/wordpress/login
requires authentication

Perform a passwordless login into WordPress by generating a secure token.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
X-Code
Example:
{{AUTH_CODE}}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/wordpress/login" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response: