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 application actions (start/stop/restart)

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "This application does not support auto restart feature"
}

Update OpenLiteSpeed 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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "Not Found"
}

Get application log.

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

Returns the last lines of an installed application's log file. Colors and other terminal escape codes are kept. Only available for applications that write their logs to a single file; for the others, browse their log folder instead.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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

Query Parameters

lines
integer

Number of lines to return, from 10 to 1000. Defaults to 100.

Example:
200

Response Fields

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/applications/5/log?lines=200" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "path": "/var/log/redis/redis-server.log",
        "content": "1:M 20 Oct 2026 10:00:00.000 * Ready to accept connections tcp\n"
    }
}
{
    "message": "The application is not installed on this server."
}
{
    "message": "This application does not write its logs to a single file."
}

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

Response Fields

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 "{
    \"app_id\": 4432,
    \"version\": \"8.3\",
    \"password\": \"SecureP@ss\",
    \"port\": 7700,
    \"admin_username\": \"admin\",
    \"admin_password\": \"AdminP@ss\",
    \"manager_password\": \"ManagerP@ss\",
    \"user\": \"minioadmin\",
    \"clientDns1\": \"1.1.1.1\",
    \"clientDns2\": \"1.0.0.1\",
    \"allowedIps\": [
        \"0.0.0.0\\/0\",
        \"::\\/0\"
    ]
}"
Example response:
{
    "data": {
        "id": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "This application is not available for Ubuntu 20.04 (x86_64)",
    "errors": {
        "version": [
            "This application is not available for Ubuntu 20.04 (x86_64)"
        ]
    }
}
{
    "message": "You already have this application installed on this server"
}
{
    "message": "This application is being installed on this server"
}
{
    "message": "Docker is being installed on this server. Install Supabase after it finishes."
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "This app cannot be uninstalled"
}
{
    "message": "lsphp83 is required by OpenLiteSpeed and cannot be uninstalled"
}
{
    "message": "Mail Server runs on Docker. Uninstall Mail Server first."
}

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. Each successful sign-in is recorded in your account's activity log.

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": "This account has been suspended. Please contact support if you believe this is a mistake.",
    "errors": {
        "email": [
            "This account has been suspended. Please contact support if you believe this is a mistake."
        ]
    }
}
{
    "message": "Your email address is not verified. Please verify it before using the API.",
    "errors": {
        "email": [
            "Your email address is not verified. Please verify it before using the API."
        ]
    }
}
{
    "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-build-id: d092ec4b5d7b
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-build-id: d092ec4b5d7b
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

Response Fields

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\": \"website\",
    \"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\": true
}"

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:
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/backups" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"drive\": \"drive\",
    \"memo\": \"Daily backup\",
    \"code\": \"oauth_code_123\",
    \"expression\": \"0 0 * * *\",
    \"cycle\": 7,
    \"all_sites\": true,
    \"sites\": [
        {
            \"id\": 1,
            \"excludes\": [
                \"architecto\"
            ]
        }
    ],
    \"excludes\": [
        \"architecto\"
    ],
    \"excludes[]\": \"node_modules\",
    \"all_databases\": true,
    \"databases\": [
        1,
        2
    ],
    \"host\": \"backup.example.com\",
    \"user\": \"backupuser\",
    \"port\": 22,
    \"auth_password\": true,
    \"password\": \"secretpass\",
    \"private_key\": \"-----BEGIN OPENSSH PRIVATE KEY-----\\\\n...\\\\n-----END OPENSSH PRIVATE KEY-----\",
    \"passphrase\": \"myPassphrase\",
    \"s3_provider\": \"AWS\",
    \"s3_access_key_id\": \"AKIAIOSFODNN7EXAMPLE\",
    \"s3_secret_access_key\": \"wJalrXUtnFEMI\\/K7MDENG\\/bPxRfiCYEXAMPLEKEY\",
    \"s3_region\": \"us-east-1\",
    \"s3_endpoint\": \"https:\\/\\/s3.us-west-2.amazonaws.com\"
}"
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

Response Fields

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:
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

Response Fields

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: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"www.example.com. 3600 IN A 1.2.3.4\"
}"
Example response:
{
    "data": {
        "id": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

Download DNS zone file.

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

Redirects to a short-lived link that downloads the exported DNS zone file straight from the server. The link expires after 10 minutes.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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:
Headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
    "message": "Unauthenticated."
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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\"
}"
Example response:
{
    "data": {
        "id": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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. The user is updated in place: existing connections and privileges on databases that stay selected are kept, and databases removed from the list lose the user's access.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "Bad Request"
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "Cannot import system database"
}

Get database backup download link.

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

Returns a short-lived link to download the latest export of the database straight from the server. The link expires after 10 minutes; request a new one if it has expired. The backup itself is removed 3 hours after it was created.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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

Response Fields

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:
{
    "url": "https://abcdefghijklmn.flashpanel.link/files/download?root=%2F&path=%2Froot%2F.flashpanel%2Fexports%2F1_mydb.sql.gz&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9"
}
{
    "message": "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

Response Fields

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",
            "roles": [],
            "users": [],
            "sites": [],
            "has_backup": true,
            "backup_size": 1572864,
            "backup_created_at": "2026-11-02 05:30:00",
            "is_user_database": true,
            "icon": "mdi-database"
        }
    ]
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

Update database.

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

Change which database users can access the database. Users removed from the list lose their access; the database and its data are left untouched. MongoDB databases are not supported: manage MongoDB access through database user roles instead.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "Bad Request"
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Generates a new deploy key and writes its private key to the site's server. When the event finishes, the site's deploy_key holds the public key to add to your Git repository.

Headers

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

URL Parameters

site
integer
required

The site ID.

Example:
1

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

Re-add the site's existing deploy key to its connected Git repository.

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

This endpoint restores provider access without changing the key on the server.

Headers

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

URL Parameters

site
integer
required

The site ID.

Example:
1
Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/deploys/key/sync" \
    --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..."
        }
    }
}

Rotate deploy key.

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

Generates a new deploy key, adds it to the connected Git repository, then replaces the key on the server. If the server cannot be updated, the repository gets the previous key back.

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

Response Fields

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/1/deploys/key/rotate" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

Delete deploy key.

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

Removes the site's deploy key from its server; the site goes back to using the server's SSH key.

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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 text file on the server with the given content.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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/save" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"root\": \"\\/home\\/flashvps\",
    \"new\": \"false\",
    \"file_content\": \"<h1>Hello<\\/h1>\",
    \"path\": \"\\/home\\/flashvps\\/index.html\",
    \"encode\": false
}"
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:

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "8G Firewall is only supported for Nginx and Apache"
}

Firewall Rules

APIs for managing server firewall rules (UFW)

Delete firewall rule.

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

Remove a firewall rule from the server by spec. Cannot delete SSH port rules when it is the last rule for that port.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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

Response Fields

Example request:
curl --request DELETE \
    "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 "{
    \"type\": \"allow\",
    \"to_port\": \"80\",
    \"from_port\": \"1024:65535\",
    \"protocol\": \"tcp\",
    \"from_ip_address\": \"192.168.1.0\\/24\",
    \"direction\": \"in\",
    \"log\": \"none\",
    \"interface\": \"architecto\"
}"
Example response:

List firewall rules.

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

Get all firewall rules currently configured on the server (live UFW status, not cached in DB).

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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": [
        {
            "type": "allow",
            "direction": "in",
            "protocol": "tcp",
            "to_port": "80",
            "from_ip_address": null
        }
    ]
}

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

Response Fields

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 "{
    \"comment\": \"Allow HTTP\",
    \"to_port\": \"80\",
    \"from_port\": \"1024:65535\",
    \"protocol\": \"tcp\",
    \"type\": \"allow\",
    \"from_ip_address\": \"192.168.1.0\\/24\",
    \"direction\": \"in\",
    \"log\": \"none\"
}"
Example response:
{
    "event": {
        "id": 1,
        "status": "running"
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Create a mail domain.

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

Adds a domain to the mail server and creates its DKIM key. The first domain of the server becomes the default domain: its mail server hostname (for example mail.example.com) becomes the hostname of the mail server. The domain is normalized before it is saved: it is lowercased, a trailing dot is removed and an internationalized domain is converted to its ASCII form (xn--...).

When the owner of the server has a Cloudflare DNS credential for the zone of the domain, the missing DNS records are created once the DKIM key is ready. Existing records are never overwritten: a single SPF record gets the server IP added, while MX records of another provider and existing DMARC records are kept. The result of every record is written to the output of the event. The domain is checked automatically a minute later.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "The domain example.com has already been added to this server.",
    "errors": {
        "domain": [
            "The domain example.com has already been added to this server."
        ]
    }
}

Install SSL for the mail server.

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

Installs the active certificate of the site of the mail server hostname (for example mail.example.com) for the mail server, so mail apps can connect over IMAPS (993), SMTPS (465) and SMTP with STARTTLS (587). The certificate is checked before it is installed, and the previous configuration is restored if the mail server cannot start with it. Renewals of the same certificate are picked up automatically. Only the default domain has a mail server hostname, and Cloudflare certificates are not supported because mail apps do not trust them.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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 ID of the default mail domain.

Example:
281

Response Fields

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/mail/domains/281/ssl" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "mail.example.com uses a Cloudflare certificate, which mail apps do not trust. Install Let's Encrypt for the site, then install SSL for the mail server.",
    "errors": {
        "message": [
            "mail.example.com uses a Cloudflare certificate, which mail apps do not trust. Install Let's Encrypt for the site, then install SSL for the mail server."
        ]
    }
}

Set the default mail domain.

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

Makes the domain the default domain of the mail server: the hostname of the mail server (and of the server) becomes the mail server hostname of this domain, then the mail server restarts. Every mail domain must then point its MX record to the new hostname. The default domain only changes once the mail server runs with the new hostname; if it cannot start, the previous configuration is restored and the default domain stays the same. When the site of the new hostname already has a certificate that mail apps trust, it is installed for the mail server right after; otherwise install SSL for the mail server once that site has one.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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:
281

Response Fields

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/mail/domains/281/default" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "The domain is already the default domain.",
    "errors": {
        "message": [
            "The domain is already the default domain."
        ]
    }
}

Regenerate the DKIM key of a mail domain.

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

Creates a new DKIM key for the domain on the mail server, replacing the current key. Use it when the server no longer has the key of the domain, for example after the key files were removed. Mail is only signed once the DKIM record of the domain (selector mail) publishes the new key: when the owner of the server has a Cloudflare DNS credential for the zone, the record is updated automatically, otherwise update it with the new dkim_key of the domain. The domain is checked automatically a minute later.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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:
281

Response Fields

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/mail/domains/281/dkim" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "Page Not Found"
}

Fix the DNS records of a mail domain.

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

Creates the missing DNS records of the domain through the Cloudflare DNS credential of the server owner and returns what happened to each record. Records that belong to the mail server are corrected: the Cloudflare proxy is turned off for the mail server hostname, the server IP is added to a single existing SPF record and the DKIM record (selector mail) gets the current key. Other records are never overwritten: MX records of another provider, a DMARC record that already exists, verification TXT records and several SPF records are kept and reported instead. Check the domain again afterwards to see the published result.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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:
281

Response Fields

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/mail/domains/281/dns/fix" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "results": [
        {
            "kind": "a",
            "action": "updated",
            "message": "Turned off the Cloudflare proxy for mail.example.com so mail apps can connect to 203.0.113.10 directly."
        },
        {
            "kind": "mx",
            "action": "skipped",
            "message": "example.com already has other MX records (1 aspmx.l.google.com), left unchanged. Remove them and create MX mail.example.com (priority 10) if this server should receive mail for example.com."
        },
        {
            "kind": "spf",
            "action": "updated",
            "message": "Added ip4:203.0.113.10 to the SPF record of example.com: v=spf1 include:_spf.google.com ip4:203.0.113.10 ~all"
        },
        {
            "kind": "spf_host",
            "action": "created",
            "message": "Created SPF record mail.example.com: v=spf1 a mx ip4:203.0.113.10 -all"
        },
        {
            "kind": "dkim",
            "action": "created",
            "message": "Created DKIM record mail._domainkey.example.com with the server key."
        },
        {
            "kind": "dmarc",
            "action": "skipped",
            "message": "DMARC record _dmarc.example.com already exists, left unchanged."
        }
    ]
}
{
    "message": "Add a Cloudflare DNS credential that manages the zone of example.com to fix its DNS records automatically.",
    "errors": {
        "message": [
            "Add a Cloudflare DNS credential that manages the zone of example.com to fix its DNS records automatically."
        ]
    }
}

Create mail account.

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

Creates a mailbox on one of the server's mail domains, with optional storage limit, aliases and catch-all. The mailbox is created in the background; follow the returned event for the result.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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

Response Fields

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 2026\",
    \"quota\": \"500M\",
    \"aliases\": [
        \"[email protected]\",
        \"[email protected]\"
    ],
    \"catch_all\": false
}"
Example response:
{
    "data": {
        "id": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "The mail server is stopped. Start it on the Mail Server page and try again.",
    "code": "container_not_running",
    "state": "stopped"
}
{
    "message": "The email account [email protected] already exists.",
    "errors": {
        "email": [
            "The email account [email protected] already exists."
        ]
    }
}

Create webmail sign-in link.

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

Returns a link that signs the mailbox into the Roundcube webmail installed on one of the server's websites. The link works only once and expires 60 seconds after it is created, so open it right away and request a new one for every sign-in.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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 mailbox address.

Response Fields

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

Get mail settings.

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

Retrieves the current settings of the mail 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

Response Fields

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,
    "ENABLE_CLAMAV": false,
    "POSTFIX_MESSAGE_SIZE_LIMIT": 25
}
{
    "ENABLE_POP3": false,
    "ENABLE_MANAGESIEVE": false,
    "ENABLE_FAIL2BAN": true,
    "ENABLE_CLAMAV": true,
    "POSTFIX_MESSAGE_SIZE_LIMIT": 0
}
{
    "ENABLE_POP3": false,
    "ENABLE_MANAGESIEVE": false,
    "ENABLE_FAIL2BAN": true,
    "ENABLE_CLAMAV": true,
    "POSTFIX_MESSAGE_SIZE_LIMIT": null
}
{
    "message": "Unable to read the mail server settings: grep: /opt/mailserver/.env: No such file or directory"
}

Update mail settings.

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

Updates the settings of the mail server and restarts it to apply them. When the mail server is stopped, the settings are saved and apply the next time it starts. If the mail server does not become ready with the new settings, the previous settings are restored and the event fails.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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

Response Fields

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,
    \"ENABLE_CLAMAV\": false,
    \"POSTFIX_MESSAGE_SIZE_LIMIT\": 25
}"
Example response:
{
    "data": {
        "id": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

Check a mail domain.

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

Checks the DNS records (A, MX, SPF, DKIM, DMARC), reverse DNS, outbound port 25 and the SSL certificates of the mail domain right away, then returns the mail domain with the result of every check. Each check that fails includes a reason code, the values that are currently published and the record the domain needs. A lookup that cannot be completed is reported as unknown with the reason lookup_failed instead of failing the request. You can check a domain up to 6 times per minute.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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:
281

Response Fields

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/1/mail/domains/281/check" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "data": {
        "id": 281,
        "server_id": 1,
        "domain": "example.com",
        "subdomain": "mail",
        "fqdn": "mail.example.com",
        "is_default": true,
        "zone": "example.com",
        "dkim_key": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA",
        "status": "action_required",
        "is_completed": false,
        "last_checked_at": "2026-11-08T09:12:44+00:00",
        "dns": {
            "connected": true,
            "provider": "cloudflare",
            "zone": "example.com"
        },
        "site": {
            "id": 148761,
            "name": "mail.example.com",
            "certificate": {
                "id": 9001,
                "type": "cloudflare",
                "is_cloudflare": true
            }
        },
        "checks": [
            {
                "kind": "a",
                "status": "error",
                "reason": "cloudflare_proxied",
                "required": true,
                "record": {
                    "type": "A",
                    "host": "mail.example.com",
                    "host_relative": "mail",
                    "value": "203.0.113.10",
                    "priority": null
                },
                "found": [
                    "104.21.93.5",
                    "172.67.201.217"
                ],
                "params": {
                    "server_ip": "203.0.113.10",
                    "expected": "203.0.113.10",
                    "type": "A",
                    "host": "mail.example.com",
                    "host_relative": "mail",
                    "found": "104.21.93.5, 172.67.201.217"
                },
                "actions": [
                    "fix_dns"
                ]
            },
            {
                "kind": "mx",
                "status": "warning",
                "reason": "cf_dc_mx",
                "required": true,
                "record": {
                    "type": "MX",
                    "host": "example.com",
                    "host_relative": "@",
                    "value": "mail.example.com",
                    "priority": 10
                },
                "found": [
                    "10 _dc-mx.779e2bb7ba19.example.com (203.0.113.10)"
                ],
                "params": {
                    "domain": "example.com",
                    "expected": "mail.example.com",
                    "server_ip": "203.0.113.10",
                    "target": "_dc-mx.779e2bb7ba19.example.com",
                    "host": "example.com",
                    "host_relative": "@",
                    "found": "10 _dc-mx.779e2bb7ba19.example.com (203.0.113.10)"
                },
                "actions": [
                    "fix_dns"
                ]
            },
            {
                "kind": "site_ssl",
                "status": "error",
                "reason": "cloudflare_origin",
                "required": true,
                "record": null,
                "found": [],
                "params": {
                    "fqdn": "mail.example.com",
                    "site_id": "148761",
                    "site_name": "mail.example.com",
                    "type": "cloudflare"
                },
                "actions": [
                    "install_site_ssl",
                    "open_site_ssl"
                ]
            },
            {
                "kind": "mail_ssl",
                "status": "unchecked",
                "reason": "waiting_site_ssl",
                "required": true,
                "record": null,
                "found": [],
                "params": {
                    "fqdn": "mail.example.com"
                },
                "actions": []
            }
        ]
    }
}
{
    "message": "Page Not Found"
}
{
    "message": "Too Many Attempts."
}

List mail domains.

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

Returns the mail domains of the server, the default domain first. Each domain includes the DNS records it needs and the result of the latest check, so this endpoint does not run any lookup. Domains that have never been checked report every check as unchecked.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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": 281,
            "server_id": 1,
            "domain": "example.com",
            "subdomain": "mail",
            "fqdn": "mail.example.com",
            "is_default": true,
            "zone": "example.com",
            "dkim_key": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA",
            "status": "unchecked",
            "is_completed": false,
            "last_checked_at": null,
            "dns": {
                "connected": false,
                "provider": null,
                "zone": null
            },
            "site": null,
            "checks": [
                {
                    "kind": "mx",
                    "status": "unchecked",
                    "reason": null,
                    "required": true,
                    "record": {
                        "type": "MX",
                        "host": "example.com",
                        "host_relative": "@",
                        "value": "mail.example.com",
                        "priority": 10
                    },
                    "found": [],
                    "params": {},
                    "actions": []
                }
            ]
        }
    ]
}

Delete a mail domain.

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

Deletes the domain from the mail server together with every mailbox, alias and the DKIM key of the domain. The mail of the domain is backed up on the server (in /opt/mailserver/backups) and the backup is removed after 7 days. To confirm, send the domain in confirm. The default domain can only be deleted when it is the last domain: set another domain as the default domain first. The mail server needs at least one email account, so deleting a domain that holds the last accounts of the server fails before anything is deleted. Domains of a protected server cannot be deleted.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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:
281

Body Parameters

Response Fields

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/1/mail/domains/281" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"confirm\": \"example.com\"
}"
Example response:
{
    "data": {
        "id": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}
{
    "message": "Server is protected. Please disable protection before performing this action."
}
{
    "message": "Type example.com to confirm that every mailbox of this domain will be deleted.",
    "errors": {
        "confirm": [
            "Type example.com to confirm that every mailbox of this domain will be deleted."
        ]
    }
}
{
    "message": "Set another domain as the default domain before deleting example.com.",
    "errors": {
        "message": [
            "Set another domain as the default domain before deleting example.com."
        ]
    }
}

List mail accounts.

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

Returns every mailbox on the server's mail server with its storage limit, aliases and catch-all setting. The list is read live from the server, so it fails with 409 while the mail server is stopped or still starting.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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

domain
string

Only return accounts of this mail domain.

Example:
example.com
search
string

Only return accounts whose address or one of its aliases contains this text.

Example:
info

Body Parameters

Response Fields

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/1/mail/accounts?domain=example.com&search=info" \
    --header "Authorization: Bearer {{AUTH_TOKEN}}" \
    --header "X-Code: {{AUTH_CODE}}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"domain\": \"b\",
    \"search\": \"n\"
}"
Example response:
[
    {
        "email": "[email protected]",
        "domain": "example.com",
        "quota": "100M",
        "quota_display": "( 1.1K / 100M ) [1%]",
        "usage": "1.1K",
        "aliases": [
            "[email protected]",
            "[email protected]"
        ],
        "catch_all": true
    }
]
{
    "message": "The mail server is stopped. Start it on the Mail Server page and try again.",
    "code": "container_not_running",
    "state": "stopped"
}
{
    "message": "Could not read the email accounts on the server: ERROR: ...",
    "code": "script_failed"
}

Update mail account.

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

Changes only the fields you send: password, storage limit, aliases or catch-all. Fields you leave out stay as they are. The change runs in the background; follow the returned event for the result. Without an active paid plan you can still change the password; changing the storage limit, aliases or catch-all requires a paid plan.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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 mailbox address.

Body Parameters

Response Fields

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

Delete mail account or alias.

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

Deletes the mailbox and all of its mail, or removes a single alias from it when alias is sent. The system mailbox created with the mail server and the last mailbox on the server cannot be deleted. The deletion runs in the background; follow the returned event for the result.

Headers

Authorization
Example:
Bearer {{AUTH_TOKEN}}
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 mailbox address.

Body Parameters

Response Fields

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

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

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

Response Fields

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": 23418,
        "description": "Sync Web Server Configuration",
        "status": "RUNNING",
        "exit_status": null,
        "is_timeout": false,
        "total_seconds": 0,
        "running_at": "2026-11-01T08:42:17.000000Z",
        "finished_at": null,
        "created_at": "2026-11-01T08:42:17.000000Z",
        "updated_at": "2026-11-01T08:42:17.000000Z",
        "read_at": null,
        "output": "",
        "solution": null,
        "user_id": 1,
        "server_id": 384,
        "site_id": 101677,
        "color": "info",
        "is_finished": false,
        "user_name": "John Doe",
        "user_avatar": "https://ui-avatars.com/api/?name=J+D&color=7F9CF5&background=EBF4FF",
        "type": "webserver_sync",
        "model_id": 0
    }
}

Get n8n export download link.

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

Returns a short-lived link to download the latest export of the n8n data (a ZIP file named after the site and the export time) straight from the server. The link expires after 10 minutes; request a new one if it has expired.

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

Response Fields

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:
{
    "url": "https://abcdefghijklmn.flashpanel.link/files/download?root=%2F&path=%2Fopt%2Fn8n%2F1%2Fexports%2Fn8n-example-com-2026-11-02-05-30.zip&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9"
}
{
    "message": "No n8n export file"
}

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:
application/json
Accept
Example:
application/json

URL Parameters

site
integer
required

The site ID.

Example:
1

Body Parameters

Response Fields