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:
102196
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/backups/102196" \
    --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:
102196
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/backups/102196/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"
}

Import backup configurations from rclone.conf on the server.

POST
https://flashpanel.io
/api/servers/{server}/backups/import-rclone
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/backups/import-rclone" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

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:
102196
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/backups/102196/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:
102196

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/backups/102196/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:
102196

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/backups/102196/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\": true,
    \"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_provider=AWS"\
    --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/phpvtr59q28njv97OwiyI5" 
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:
102196
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/backups/102196" \
    --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/php4a8rclobvu6p8hUezl1" 
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 ID.

Example:
1

Query Parameters

search
string

Filter zones by name.

Example:
example.com
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/bind9/zones?search=example.com" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[
    {
        "name": "example.com",
        "serial": 2024010101
    }
]

Create a DNS zone.

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

Creates a new DNS zone on the server's Bind9 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

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/bind9/zones" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"example.com\",
    \"host\": \"1.2.3.4\",
    \"primary_ns\": \"ns1.example.com\",
    \"email\": \"[email protected]\",
    \"ttl\": 86400,
    \"refresh\": 3600,
    \"retry\": 900,
    \"expire\": 1209600,
    \"minimum\": 86400
}"
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 a DNS zone.

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

Updates an existing DNS zone 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
zone
string
required

The zone name.

Example:
example.com

Body Parameters

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/1/bind9/zones/example.com" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"example.com\",
    \"host\": \"1.2.3.4\",
    \"primary_ns\": \"ns1.example.com\",
    \"email\": \"[email protected]\",
    \"ttl\": 86400,
    \"refresh\": 3600,
    \"retry\": 900,
    \"expire\": 1209600,
    \"minimum\": 86400
}"
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 a DNS zone.

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

Permanently removes a DNS zone 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
zone
string
required

The zone name.

Example:
example.com
Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/bind9/zones/example.com" \
    --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 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, including container usage information.

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/images" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[
    {
        "ID": "sha256:abc123",
        "Repository": "nginx",
        "Tag": "latest",
        "Size": "142MB",
        "UsedByContainers": [],
        "ImageURL": "https://hub.docker.com/_/nginx",
        "Status": 0
    }
]

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 ID.

Example:
1
Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/docker/networks" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
[
    {
        "Name": "bridge",
        "Driver": "bridge",
        "Scope": "local",
        "CreatedAt": "2 hours ago"
    }
]

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 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/files/list" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/home\\/flashvps\",
    \"root\": \"\\/home\\/flashvps\"
}"
Example response:
[
    {
        "name": "index.php",
        "type": "file",
        "size": 1024,
        "permissions": "0644"
    }
]

Create a directory.

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

Creates a new directory at the specified path 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/files/mkdir" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/home\\/flashvps\",
    \"root\": \"\\/home\\/flashvps\",
    \"name\": \"my-folder\"
}"
Example response:

Save a file.

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

Saves or creates a file on the server. The file content is uploaded as a multipart form 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

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/files/save" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "root=/home/flashvps"\
    --form "new=false"\
    --form "path=/home/flashvps/index.html"\
    --form "encode="\
    --form "file=@/private/var/folders/qq/kvhmbqts2kjdk_q1d18jdvg80000gn/T/php81qipqnl82jkcQ9djzW" 
Example response:

Delete files or directories.

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

Deletes one or more files or directories at the specified paths.

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 DELETE \
    "https://flashpanel.io/api/servers/1/files/delete" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": [
        \"\\/home\\/flashvps\\/old-file.txt\"
    ],
    \"root\": \"\\/home\\/flashvps\"
}"
Example response:

View file content.

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

Retrieves the content of 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

Body Parameters

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/files/view" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"root\": \"\\/home\\/flashvps\",
    \"limit\": 500,
    \"path\": \"\\/home\\/flashvps\\/index.html\",
    \"encode\": false
}"
Example response:
"file content here..."

Rename a file or directory.

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

Renames a file or directory 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/files/rename" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/home\\/flashvps\\/old-name.txt\",
    \"root\": \"\\/home\\/flashvps\",
    \"name\": \"new-name.txt\"
}"
Example response:

Compress files.

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

Compresses files or directories into an archive.

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/files/compress" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": [
        \"\\/home\\/flashvps\\/folder\"
    ],
    \"root\": \"\\/home\\/flashvps\",
    \"level\": 6,
    \"type\": \"zip\",
    \"name\": \"backup.zip\"
}"
Example response:

Decompress an archive.

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

Extracts the contents of an archive 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

Body Parameters

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

Copy a file or directory.

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

Copies a file or directory to a new destination 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/files/copy" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/home\\/flashvps\\/file.txt\",
    \"root\": \"\\/home\\/flashvps\",
    \"destination\": \"\\/home\\/flashvps\\/backup\\/file.txt\"
}"
Example response:

Move a file or directory.

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

Moves a file or directory to a new location 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/files/move" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/home\\/flashvps\\/file.txt\",
    \"root\": \"\\/home\\/flashvps\",
    \"destination\": \"\\/home\\/flashvps\\/archive\\/file.txt\"
}"
Example response:

Change file permissions.

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

Changes the permissions (chmod) of a file or directory 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/files/chmod" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/home\\/flashvps\\/script.sh\",
    \"root\": \"\\/home\\/flashvps\",
    \"mode\": \"0755\"
}"
Example response:

Change file owner.

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

Changes the owner and group of a file or directory 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/files/chown" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"\\/home\\/flashvps\\/file.txt\",
    \"root\": \"\\/home\\/flashvps\",
    \"owner\": \"flashvps\",
    \"group\": \"flashvps\"
}"
Example response:

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/phphp9oi8nfdl0v4yq4Iev" 
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/phpjlivv9isqus95OKsuMP" 
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]

OpenClaw

APIs for managing OpenClaw

Get OpenClaw logs.

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

Get the latest daemon logs for OpenClaw.

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

lines
integer

The number of lines to return. Default: 100.

Example:
100

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/openclaw/logs?lines=100" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"lines\": 1
}"
Example response:
{
    "output": "logs...",
    "success": true
}

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 ID.

Example:
1

Body Parameters

Example request:
curl --request GET \
    --get "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\": \"cli\",
    \"php_version\": \"php8.3\"
}"
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 passwordless login into the phpMyAdmin site. Generates a secure token and redirects 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 ID (must be a phpMyAdmin site).

Example:
1

Body Parameters

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/1/phpmyadmin/login" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"database_user\": \"flashvps\"
}"
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 the current SSHD configuration from the server, mapped to a 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 ID.

Example:
1
Example request:
curl --request GET \
    --get "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:
[
    {
        "key": "port",
        "value": [
            "22"
        ],
        "type": "number"
    }
]

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 a CSR.

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

Creates a Certificate Signing Request (CSR) that can be used to purchase an SSL certificate from a certificate authority.

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/csr" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"city\": \"Ho Chi Minh City\",
    \"country\": \"VN\",
    \"department\": \"IT\",
    \"domain\": \"example.com\",
    \"organization\": \"My Company\",
    \"state\": \"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"
    }
}

Import an existing certificate.

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

Imports an existing SSL certificate (key + cert) for a site. Optionally auto-activates after import.

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/import" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"certificate_key\": \"-----BEGIN PRIVATE KEY-----...\",
    \"certificate_cert\": \"-----BEGIN CERTIFICATE-----...\",
    \"auto_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"
    }
}

Clone a certificate.

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

Clones an SSL certificate from another site to the current site. The certificate must be accessible to the authenticated 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
certificate
integer
required

The source certificate ID to clone.

Example:
5

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/certificates/5/clone" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"auto_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"
    }
}

Install certificate for CSR.

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

Installs the signed certificate content for a previously generated CSR.

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 (CSR).

Example:
1

Body Parameters

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/certificates/1/install" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"certificate_cert\": \"-----BEGIN CERTIFICATE-----...\"
}"
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 a certificate.

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

Activates an installed SSL certificate on the site, making it the active certificate served to visitors.

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 POST \
    "https://flashpanel.io/api/sites/1/certificates/1/active" \
    --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"
    }
}

Deactivate a certificate.

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

Deactivates the SSL certificate on the site, reverting to HTTP.

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 POST \
    "https://flashpanel.io/api/sites/1/certificates/1/inactive" \
    --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 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 a provider certificate.

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

Installs an SSL certificate through a DNS provider (e.g., Cloudflare). The certificate is automatically generated and activated.

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" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"client\": \"cloudflare\"
}"
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 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/phpv1dci7qsaq16bsebEqV" 

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]

Apply server updates.

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

Executes all pending configuration updates and system patches for a specific server. This ensures the server is optimized and compliant with the latest security standards. Each update request returns an array of events to track the 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 ID of the server.

Example:
1

Response Fields

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": [
        {
            "id": 123,
            "description": "Upgrade Nginx to latest version",
            "status": "running",
            "type": "hotfix",
            "color": "primary"
        }
    ]
}

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: