This documentation aims to provide all the information you need to work with our API.
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.
APIs for managing application actions (start/stop/restart)
Start the application on the given server.
The server ID.
The application ID.
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" {
"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 the application on the given server.
The server ID.
The application ID.
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" {
"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 the application on the given server.
The server ID.
The application ID.
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" {
"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
}
}
Enable or disable automatic restart monitoring for an application.
The server ID.
The application ID.
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
}"
{
"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 OpenLiteSpeed admin username and password.
The server ID.
The application ID.
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\"
}"
{
"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
}
}
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.
The server ID.
The application ID.
Number of lines to return, from 10 to 1000. Defaults to 100.
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" {
"data": {
"path": "/var/log/redis/redis-server.log",
"content": "1:M 20 Oct 2026 10:00:00.000 * Ready to accept connections tcp\n"
}
}
Install an application on the server.
The server ID.
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\"
]
}"
{
"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 an installed application to the latest version.
The server ID.
The application ID.
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" {
"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
}
}
Uninstall an application from the server.
The server ID.
The application ID.
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" {
"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
}
}
APIs for user authentication and token management
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.
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\"
}"
{
"token": "123|xxxxxx",
"code": "yyyyyy"
}
APIs for managing server backup configurations
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.
The server.
The backup.
curl --request GET \
--get "https://flashpanel.io/api/servers/282/backups/102196" \
--header "Content-Type: application/json" \
--header "Accept: application/json" 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"
}
The server.
The backup.
curl --request GET \
--get "https://flashpanel.io/api/servers/282/backups/102196/script" \
--header "Content-Type: application/json" \
--header "Accept: application/json" 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"
}
The server.
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" The server.
The backup.
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" cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
The server.
The backup.
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
}"
The server.
The backup.
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
}"
Get all backup configurations for a server.
The server ID.
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" {
"data": [
{
"id": 1,
"memo": "Daily backup",
"drive": "drive"
}
]
}
Create a new backup configuration for a server.
The server ID.
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\"
}"
{
"backup": {
"id": 1,
"memo": "Daily backup"
},
"event": {
"id": 1,
"status": "running"
}
}
The server ID.
The backup configuration ID.
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
]
}"
{
"backup": {
"id": 1,
"memo": "Daily backup",
"is_active": true
},
"event": {
"id": 1,
"status": "running"
}
}
The server.
The backup.
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" Retrieve the backup history for a server.
The server ID.
Sort field. Default: -id.
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" {
"data": [
{
"id": 1,
"name": "backup-2024-01-01",
"size": "1.5 GB",
"time": "120"
}
]
}
APIs for executing and viewing site commands
Retrieves a paginated list of commands executed on a given site.
The site ID.
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" {
"data": [
{
"id": 1,
"script": "ls -la",
"output": "..."
}
]
}
Store and execute a new command for a site.
The site ID.
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\"
}"
{
"data": {
"id": 1,
"script": "ls -la",
"status": "running"
}
}
APIs for managing Bind9 DNS zones
Import DNS records from a zone file.
The server ID.
The zone name.
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\"
}"
{
"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 to a file on the server.
The server ID.
The zone name.
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" {
"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
}
}
Redirects to a short-lived link that downloads the exported DNS zone file straight from the server. The link expires after 10 minutes.
The server ID.
The zone name.
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"
Get all DNS zones configured on the server.
The server ID.
Filter zones by name.
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" [
{
"name": "example.com",
"serial": 2024010101
}
]
Creates a new DNS zone on the server's Bind9 service.
The server ID.
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
}"
{
"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
}
}
Updates an existing DNS zone configuration on the server.
The server ID.
The zone name.
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
}"
{
"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
}
}
Permanently removes a DNS zone from the server.
The server ID.
The zone name.
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" {
"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 all DNS records for a specific zone.
The server ID.
The zone name.
Search query.
Search match type: any, all.
Items per page.
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" {
"data": [
{
"type": "A",
"name": "www",
"content": "192.168.1.1",
"ttl": 3600
}
]
}
Create a new DNS record in the zone.
The server ID.
The zone name.
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
}"
Update an existing DNS record in the zone.
The server ID.
The zone name.
Record ID.
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
}"
Delete a DNS record from the zone.
The server ID.
The zone name.
Record ID.
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"
APIs for managing database users on servers
Synchronize database users with the actual database server.
The server ID.
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\"
}"
{
"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 all database users on a server with their associated databases.
The server ID.
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" {
"data": [
{
"id": 1,
"name": "dbuser",
"type": "mysql"
}
]
}
Create a new database user on the server.
The server ID.
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\"
}"
{
"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 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.
The server ID.
The database user ID.
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\"
}"
{
"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 database user from the server. Cannot delete users linked to PHPMyAdmin, WordPress, or other application sites.
The server ID.
The database user ID.
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" {
"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
}
}
APIs for managing databases on servers
Export a database to a backup file on the server.
The server ID.
The database ID.
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" {
"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 data into a database from a file on the server.
The server ID.
The database ID.
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
}"
{
"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
}
}
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.
The server ID.
The database ID.
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" {
"url": "https://abcdefghijklmn.flashpanel.link/files/download?root=%2F&path=%2Froot%2F.flashpanel%2Fexports%2F1_mydb.sql.gz&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9"
}
Get all databases on a server with their associated users.
The server ID.
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" {
"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 a new database on the server.
The server ID.
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
]
}"
{
"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
}
}
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.
The server ID.
The database ID.
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
]
}"
{
"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 database from the server. Cannot delete system databases or databases used by PHPMyAdmin sites.
The server ID.
The database ID.
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" {
"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
}
}
Retrieve MySQL/MariaDB configuration with current values from the server.
The server ID.
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" [
{
"key": "max_connections",
"value": "151",
"type": "number"
}
]
Update MySQL/MariaDB configuration on the server.
The server ID.
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" {
"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
}
}
APIs for managing site deployments and deployment scripts
Retrieves a paginated collection of deployments for a given site.
The site ID.
Page number. Default: 1.
Items per page. Default: 10.
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" {
"data": [
{
"id": 1,
"status": "success",
"created_at": "2024-01-01T00:00:00Z"
}
]
}
Retrieves the list of available deployment script variables.
The site ID.
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" {
"SITE_NAME": "example.com",
"SITE_PATH": "/home/user/example.com"
}
Updates the deployment script for a site.
The site ID.
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\"
}"
{
"data": {
"id": 1,
"name": "example.com"
}
}
Deploy the latest source code. The system will run the deployment script.
The site ID.
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" {
"deployment": {
"id": 1,
"status": "running"
},
"event": {
"id": 1,
"status": "running"
}
}
Refreshes the deployment webhook token for the site.
The site ID.
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" {
"link": "https://example.com/deploy?token=..."
}
Enables or disables automatic deployment for the site.
The site ID.
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" {
"data": {
"id": 1,
"name": "example.com",
"autodeploy_enabled": true
}
}
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.
The site ID.
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" {
"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
}
}
This endpoint restores provider access without changing the key on the server.
The site ID.
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" {
"data": {
"id": 1,
"name": "example.com",
"attrs": {
"deploy_key": "ssh-rsa AAAA..."
}
}
}
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.
The site ID.
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" {
"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
}
}
Removes the site's deploy key from its server; the site goes back to using the server's SSH key.
The site ID.
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" {
"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
}
}
APIs for managing Docker images
Remove all unused Docker images from the server.
The server ID.
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" [Empty response]
Get all Docker images on the server, including container usage information.
The server ID.
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" [
{
"ID": "sha256:abc123",
"Repository": "nginx",
"Tag": "latest",
"Size": "142MB",
"UsedByContainers": [],
"ImageURL": "https://hub.docker.com/_/nginx",
"Status": 0
}
]
Remove a Docker image from the server.
The server ID.
Image ID or name.
Force remove even if in use.
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" [Empty response]
Start a stopped or paused Docker container.
The server ID.
Container ID or name.
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
}"
[Empty response]
Stop a running Docker container.
The server ID.
Container ID or name.
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" [Empty response]
Restart a Docker container.
The server ID.
Container ID or name.
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" [Empty response]
Pause a running Docker container.
The server ID.
Container ID or name.
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" [Empty response]
Rename a Docker container.
The server ID.
Container ID or name.
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\"
}"
[Empty response]
Get the last 100 lines of container logs.
The server ID.
Container ID or name.
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" "Log output text..."
Get real-time resource usage statistics for a container.
The server ID.
Container ID or name.
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" {
"CPUPerc": "0.50%",
"MemUsage": "100MiB / 1GiB",
"NetIO": "1kB / 2kB"
}
Get all Docker containers on the server.
The server ID.
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" [
{
"ID": "abc123",
"Names": "mycontainer",
"Image": "nginx",
"State": "running"
}
]
Get detailed information about a Docker container.
The server ID.
Container ID or name.
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" {
"Id": "abc123",
"Name": "mycontainer",
"State": {
"Status": "running"
}
}
Stop and remove a Docker container.
The server ID.
Container ID or name.
Force remove even if running.
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" [Empty response]
Create a copy of a Docker volume with a new name.
The server ID.
Source volume name.
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\"
}"
[Empty response]
Remove all unused Docker volumes from the server.
The server ID.
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" [Empty response]
Get all Docker volumes on the server.
The server.
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" cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Remove a Docker volume from the server.
The server ID.
Volume name.
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" [Empty response]
Remove all unused Docker networks from the server.
The server ID.
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" [Empty response]
Get all Docker networks on the server.
The server ID.
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" [
{
"Name": "bridge",
"Driver": "bridge",
"Scope": "local",
"CreatedAt": "2 hours ago"
}
]
APIs for managing files and directories on the server via agent
Get server system information (CPU, memory, disk, etc.) via agent.
The server ID.
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" {
"cpu": {
"cores": 4,
"usage": 15.5
},
"memory": {
"total": 8192,
"used": 4096
},
"disk": {
"total": 100,
"used": 45
}
}
List files and directories in a given path on the server.
The server ID.
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\"
}"
[
{
"name": "index.php",
"type": "file",
"size": 1024,
"permissions": "0644"
}
]
Creates a new directory at the specified path on the server.
The server ID.
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\"
}"
Saves or creates a text file on the server with the given content.
The server ID.
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
}"
Deletes one or more files or directories at the specified paths.
The server ID.
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\"
}"
Retrieves the content of a file on the server.
The server ID.
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
}"
"file content here..."
Renames a file or directory on the server.
The server ID.
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\"
}"
Compresses files or directories into an archive.
The server ID.
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\"
}"
Extracts the contents of an archive file on the server.
The server ID.
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
}"
Copies a file or directory to a new destination on the server.
The server ID.
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\"
}"
Moves a file or directory to a new location on the server.
The server ID.
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\"
}"
Changes the permissions (chmod) of a file or directory on the server.
The server ID.
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\"
}"
Changes the owner and group of a file or directory on the server.
The server ID.
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\"
}"
APIs for managing Fail2ban jails
Unban one or more IP addresses from a Fail2ban jail.
The server ID.
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\"
]
}"
Enable or disable a Fail2ban jail.
The server ID.
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
}"
Get available filters and actions for Fail2ban configuration.
The server ID.
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" {
"filters": [
"sshd",
"nginx-http-auth"
],
"actions": [
"iptables-multiport",
"firewallcmd-ipset"
]
}
Get all configured Fail2ban jails on the server.
The server ID.
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" {
"data": [
{
"name": "sshd",
"enabled": true,
"banned_ip_list": []
}
]
}
Create or update a Fail2ban jail configuration.
The server ID.
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\"
}"
Delete a Fail2ban jail configuration.
The server ID.
Jail name.
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"
Enable 8G Firewall protection for a site.
The site ID.
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" {
"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 8G Firewall protection for a site.
The site ID.
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" {
"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
}
}
APIs for managing server firewall rules (UFW)
Remove a firewall rule from the server by spec. Cannot delete SSH port rules when it is the last rule for that port.
The server ID.
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\"
}"
Get all firewall rules currently configured on the server (live UFW status, not cached in DB).
The server ID.
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" {
"data": [
{
"type": "allow",
"direction": "in",
"protocol": "tcp",
"to_port": "80",
"from_ip_address": null
}
]
}
Create a new firewall rule on the server.
The server ID.
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\"
}"
{
"event": {
"id": 1,
"status": "running"
}
}
APIs for managing Linux system users on servers
Synchronize Linux system users from the server.
The server ID.
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" {
"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 all Linux system users on the server.
The server ID.
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" {
"data": [
{
"id": 1,
"name": "webuser",
"can_ssh": true,
"can_ftp": false
}
]
}
Create a new Linux system user on the server.
The server ID.
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
}"
{
"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 Linux user's permissions and quotas.
The server ID.
The Linux user ID.
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
}"
{
"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 Linux system user from the server.
The server ID.
The Linux user ID.
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" {
"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
}
}
APIs for managing site load balancing
Enable load balancing for a site.
The site ID.
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" {
"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 load balancing for a site.
The site ID.
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" {
"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
}
}
Store load balancing configuration for a site.
The site ID.
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
}
]
}"
{
"data": {
"id": 1,
"name": "example.com"
}
}
APIs for managing mail server domains
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.
The server ID.
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\"
}"
{
"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
}
}
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.
The server ID.
The ID of the default mail domain.
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" {
"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
}
}
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.
The server ID.
The mail domain ID.
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" {
"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
}
}
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.
The server ID.
The mail domain ID.
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" {
"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
}
}
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.
The server ID.
The mail domain ID.
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" {
"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."
}
]
}
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.
The server ID.
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
}"
{
"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
}
}
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.
The server ID.
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" {
"url": "https://mail.example.com?_flashpanel=1&token=Yq3...&data=eyJpdiI6..."
}
Retrieves the current settings of the mail server.
The server ID.
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" {
"ENABLE_POP3": true,
"ENABLE_MANAGESIEVE": false,
"ENABLE_FAIL2BAN": true,
"ENABLE_CLAMAV": false,
"POSTFIX_MESSAGE_SIZE_LIMIT": 25
}
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.
The server ID.
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
}"
{
"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
}
}
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.
The server ID.
The mail domain ID.
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" {
"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": []
}
]
}
}
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.
The server ID.
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" {
"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": []
}
]
}
]
}
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.
The server ID.
The mail domain ID.
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\"
}"
{
"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
}
}
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.
The server ID.
Only return accounts of this mail domain.
Only return accounts whose address or one of its aliases contains this text.
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\"
}"
[
{
"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
}
]
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.
The server ID.
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
}"
{
"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
}
}
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.
The server ID.
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]\"
}"
{
"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
}
}
APIs for managing N8N automation sites
Restart the N8N service.
The site ID.
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" {
"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 to the latest version.
The site ID.
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" {
"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 back to pre-setup state.
The site ID.
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" {
"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 the N8N license.
The site ID.
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" {
"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 the LDAP connection.
The site ID.
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\"
}"
{
"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 multi-factor authentication for a user.
The site ID.
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]\"
}"
{
"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 license information.
The site ID.
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" {
"info": "License information..."
}
Export N8N workflows and/or credentials.
The site ID.
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
}"
{
"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
}
}
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.
The site ID.
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" {
"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"
}
Get N8N data info including users, projects, workflows and credentials count.
The site ID.
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" {
"users": 5,
"projects": 3,
"workflows_count": 10,
"credentials_count": 8
}
Import a workflow into the N8N instance.
The site ID.