MENU navbar-image

Introduction

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

Authenticating requests

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

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

You can retrieve your token by follow API token.

Endpoints

Retrieves an access token and a code for the user.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/token" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"email\": \"[email protected]\",
    \"password\": \"|2T-#)~nw_~}){Y)<\",
    \"code\": \"aliquam\",
    \"device_name\": \"molestiae\"
}"
const url = new URL(
    "https://flashpanel.io/api/token"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "email": "[email protected]",
    "password": "|2T-#)~nw_~}){Y)<",
    "code": "aliquam",
    "device_name": "molestiae"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/token';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'email' => '[email protected]',
            'password' => '|2T-#)~nw_~}){Y)<',
            'code' => 'aliquam',
            'device_name' => 'molestiae',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/token'
payload = {
    "email": "[email protected]",
    "password": "|2T-#)~nw_~}){Y)<",
    "code": "aliquam",
    "device_name": "molestiae"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/token

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

Body Parameters

email   string   

The email of the user. Example: [email protected]

password   string   

The password of the user. Example: |2T-#)~nw_~}){Y)<

code   string  optional  

The 6-digit code generated by the 2FA app if the user has 2FA enabled. Example: aliquam

device_name   string  optional  

The name of the device. Defaults to "". Example: molestiae

Get backup configuration information.

requires authentication

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.

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/backups/100952" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/backups/100952"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/backups/100952';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/backups/100952'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/backups/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the backup. Example: 100952

Renew SSL Certificate for a given site.

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/renew" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"id\": 4,
    \"token\": \"recusandae\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/certificates/renew"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "id": 4,
    "token": "recusandae"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/certificates/renew';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'id' => 4,
            'token' => 'recusandae',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/certificates/renew'
payload = {
    "id": 4,
    "token": "recusandae"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/certificates/renew

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

token   string   

Token Example: mollitia

Body Parameters

id   integer   

ID of the certificate Example: 4

token   string   

Example: recusandae

Verify the token for auto login to WordPress.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/101443/wordpress/verify" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/wordpress/verify"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/wordpress/verify';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/wordpress/verify'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/sites/{site_id}/wordpress/verify

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Retrieves a collection of sites for the authenticated user.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/sites

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

Retrieves a collection of applications based on the provided request parameters and server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/applications" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"extension\": \"iyiwmgjdmiojbngdeeqiapkqzvgxxbmrwdljmidfwmdhybpnirytgoeupnrdktjuznondbnxgiyoxmrhd\",
    \"binary_name\": \"nxvcbbsqdyolfrrfnvpnhatqauttruvtxgpiudyizlau\",
    \"os_version\": 6.6740905
}"
const url = new URL(
    "https://flashpanel.io/api/servers/applications"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "extension": "iyiwmgjdmiojbngdeeqiapkqzvgxxbmrwdljmidfwmdhybpnirytgoeupnrdktjuznondbnxgiyoxmrhd",
    "binary_name": "nxvcbbsqdyolfrrfnvpnhatqauttruvtxgpiudyizlau",
    "os_version": 6.6740905
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/applications';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'extension' => 'iyiwmgjdmiojbngdeeqiapkqzvgxxbmrwdljmidfwmdhybpnirytgoeupnrdktjuznondbnxgiyoxmrhd',
            'binary_name' => 'nxvcbbsqdyolfrrfnvpnhatqauttruvtxgpiudyizlau',
            'os_version' => 6.6740905,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/applications'
payload = {
    "extension": "iyiwmgjdmiojbngdeeqiapkqzvgxxbmrwdljmidfwmdhybpnirytgoeupnrdktjuznondbnxgiyoxmrhd",
    "binary_name": "nxvcbbsqdyolfrrfnvpnhatqauttruvtxgpiudyizlau",
    "os_version": 6.6740905
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Request   

GET api/servers/applications

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

Body Parameters

extension   string  optional  

The string must be at least 1 character. Example: iyiwmgjdmiojbngdeeqiapkqzvgxxbmrwdljmidfwmdhybpnirytgoeupnrdktjuznondbnxgiyoxmrhd

binary_name   string  optional  

The string must be at least 1 character. Example: nxvcbbsqdyolfrrfnvpnhatqauttruvtxgpiudyizlau

os_version   number  optional  

Example: 6.6740905

Retrieves a collection of server transfers for the authenticated user.

requires authentication

This function retrieves a collection of server transfers that are either received by the authenticated user or sent by the authenticated user. The server transfers are ordered by their IDs in descending order.

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers-transfer" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers-transfer"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers-transfer';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers-transfer'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers-transfer

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

Create a new server transfer.

requires authentication

It creates a new server transfer instance with the provided data and sends a notification to the receiver.

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers-transfer" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"to_id\": \"rqbbgxroedbey\",
    \"server_id\": 67
}"
const url = new URL(
    "https://flashpanel.io/api/servers-transfer"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "to_id": "rqbbgxroedbey",
    "server_id": 67
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers-transfer';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'to_id' => 'rqbbgxroedbey',
            'server_id' => 67,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers-transfer'
payload = {
    "to_id": "rqbbgxroedbey",
    "server_id": 67
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers-transfer

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

Body Parameters

to_id   string   

This must be a valid email address. The string must not be greater than 191 characters. Example: rqbbgxroedbey

server_id   number   

Must be at least 1. Example: 67

Update the status of a VPS server transfer.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers-transfer/9" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"status\": \"cancelled\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers-transfer/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "status": "cancelled"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers-transfer/9';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'status' => 'cancelled',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers-transfer/9'
payload = {
    "status": "cancelled"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers-transfer/{id}

PATCH api/servers-transfer/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

id   integer   

The ID of the servers transfer. Example: 9

Body Parameters

status   string|in:pending,approved,rejected,cancelled   

Trạng thái muốn cập nhật. Example: cancelled

Retrieves a collection of servers based on the provided request parameters.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

search   string  optional  

string|int Lọc theo Tên hoặc ID của máy chủ Example: officia

Create a new server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"provider\": \"eaque\",
    \"name\": \"facilis\",
    \"custom_script\": 12,
    \"customProvider\": \"quisquam\",
    \"ip\": \"ipsa\",
    \"ssh_port\": \"in\",
    \"auth_password\": false,
    \"ssh_password\": \"quo\",
    \"ssh_private_key\": \"rem\",
    \"ssh_passphrase\": \"doloremque\",
    \"notCustomProvider\": \"culpa\",
    \"plan\": \"assumenda\",
    \"region\": \"dolorem\",
    \"credential\": \"ut\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "provider": "eaque",
    "name": "facilis",
    "custom_script": 12,
    "customProvider": "quisquam",
    "ip": "ipsa",
    "ssh_port": "in",
    "auth_password": false,
    "ssh_password": "quo",
    "ssh_private_key": "rem",
    "ssh_passphrase": "doloremque",
    "notCustomProvider": "culpa",
    "plan": "assumenda",
    "region": "dolorem",
    "credential": "ut"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'provider' => 'eaque',
            'name' => 'facilis',
            'custom_script' => 12,
            'customProvider' => 'quisquam',
            'ip' => 'ipsa',
            'ssh_port' => 'in',
            'auth_password' => false,
            'ssh_password' => 'quo',
            'ssh_private_key' => 'rem',
            'ssh_passphrase' => 'doloremque',
            'notCustomProvider' => 'culpa',
            'plan' => 'assumenda',
            'region' => 'dolorem',
            'credential' => 'ut',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers'
payload = {
    "provider": "eaque",
    "name": "facilis",
    "custom_script": 12,
    "customProvider": "quisquam",
    "ip": "ipsa",
    "ssh_port": "in",
    "auth_password": false,
    "ssh_password": "quo",
    "ssh_private_key": "rem",
    "ssh_passphrase": "doloremque",
    "notCustomProvider": "culpa",
    "plan": "assumenda",
    "region": "dolorem",
    "credential": "ut"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

Body Parameters

provider   string   

Nhà cung cấp máy chủ: custom, 123HOST, tinohost, vultr, digitalocean, linode, upcloud Example: eaque

name   string   

Tên máy chủ Example: facilis

custom_script   integer  optional  

ID của kịch bản tùy chỉnh Example: 12

customProvider   string  optional  

Đây không phải là thuộc tính. Các giá trị sau áp dụng cho loại máy chủ Custom Example: quisquam

ip   string|ip|unique  optional  

string Địa chỉ IP hợp V4 hoặc V6 hợp lệ Example: ipsa

ssh_port   int|min:1|max:65535   

Cổng truy cập SSH vào máy chủ Example: in

auth_password   boolean   

Sử dụng mật khẩu root hay SSH Private Key để hệ thống đăng nhập vào máy chủ Example: false

ssh_password   string   


Bắt buộc nhập nếu auth_password = true.
Mật khẩu root Example: quo

ssh_private_key   file|max:512   


Bắt buộc nhập nếu auth_password = false.
Tập tin SSH Private Key dùng để đăng nhập vào máy chủ Example: rem

ssh_passphrase   string  optional  

Mật khẩu tập tin SSH Private Key nếu có Example: doloremque

notCustomProvider   string  optional  

Đây không phải là thuộc tính. Các giá trị sau áp dụng cho loại máy chủ không phải là Custom Example: culpa

plan   string|exist:plan   

ID của Gói máy chủ Example: assumenda

region   string|exist:region   

ID của Khu vực. Example: dolorem

credential   int|min:1|exist:id  optional  

Bắt buộc nhập nếu loại máy chủ không là tinohost hoặc 123HOST. ID của thông tin chứng thực loại máy chủ Example: ut

Retrieves information about a server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

id   integer   

The ID of the server. Example: 282

Deletes a server.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

id   integer   

The ID of the server. Example: 282

Get server information

requires authentication

Retrieve various information about the VPS server like CPU, RAM, DISK, CORE, Swap,...

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/info" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/info"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/info';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/info'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/info

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Toggles the favorite status of a server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/favorite" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/favorite"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/favorite';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/favorite'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/favorite

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Change server display name

requires authentication

The system will also change the VPS hostname and label at the VPS provider if applicable.

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/name" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"name\": \"cum\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/name"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "name": "cum"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/name';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'name' => 'cum',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/name'
payload = {
    "name": "cum"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers/{server_id}/name

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

name   string  optional  

Display name of the server Example: cum

Change the IP address of a server.

requires authentication

When you change the IP address of a VPS server, you need to update the IP address of the server on the system.

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/ip" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"ip\": \"220.131.151.70\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/ip"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "ip": "220.131.151.70"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/ip';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'ip' => '220.131.151.70',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/ip'
payload = {
    "ip": "220.131.151.70"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers/{server_id}/ip

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

ip   string   

This must be a valid IP address. Example: 220.131.151.70

Run hotfix for the server if available

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/hotfix" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/hotfix"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/hotfix';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/hotfix'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/hotfix

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Sync backup configuration

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/sync-backup-configuration" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/sync-backup-configuration"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/sync-backup-configuration';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/sync-backup-configuration'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/sync-backup-configuration

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Adds an SSH key to the server's Git providers for the authenticated user.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/keys" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"providers\": [
        544.3
    ]
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/keys"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "providers": [
        544.3
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/keys';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'providers' => [
                544.3,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/keys'
payload = {
    "providers": [
        544.3
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/keys

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

providers   number[]   

Installs the agent for a given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/agent/install" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/agent/install"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/agent/install';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/agent/install'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/agent/install

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Generate a token for connecting with the agent.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/agent/token" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/agent/token"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/agent/token';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/agent/token'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/agent/token

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Retrieves the last 500 lines of the log file for a given server and daemon.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/daemons/3/log" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/daemons/3/log"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/daemons/3/log';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/daemons/3/log'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/daemons/{daemon_id}/log

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

daemon_id   integer   

The ID of the daemon. Example: 3

Retrieves the status of a daemon for a given server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/daemons/20/status" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/daemons/20/status"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/daemons/20/status';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/daemons/20/status'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/daemons/{daemon_id}/status

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

daemon_id   integer   

The ID of the daemon. Example: 20

Clears the log file for a given server and daemon.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/daemons/4/clear-log" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/daemons/4/clear-log"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/daemons/4/clear-log';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/daemons/4/clear-log'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/daemons/{daemon_id}/clear-log

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

daemon_id   integer   

The ID of the daemon. Example: 4

Restarts the daemon configuration for a given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/daemons/20/restart" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/daemons/20/restart"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/daemons/20/restart';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/daemons/20/restart'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/daemons/{daemon_id}/restart

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

daemon_id   integer   

The ID of the daemon. Example: 20

Starts the daemon configuration for a given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/daemons/2/start" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/daemons/2/start"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/daemons/2/start';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/daemons/2/start'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/daemons/{daemon_id}/start

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

daemon_id   integer   

The ID of the daemon. Example: 2

Stops a daemon for a given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/daemons/6/stop" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/daemons/6/stop"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/daemons/6/stop';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/daemons/6/stop'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/daemons/{daemon_id}/stop

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

daemon_id   integer   

The ID of the daemon. Example: 6

Store a new daemon configuration for a server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/daemons" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"description\": \"Voluptas culpa qui officia ipsam inventore nihil mollitia.\",
    \"command\": \"consequatur\",
    \"directory\": \"itaque\",
    \"user\": \"eaque\",
    \"processes\": 3,
    \"start_secs\": 52432713.44709943
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/daemons"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "description": "Voluptas culpa qui officia ipsam inventore nihil mollitia.",
    "command": "consequatur",
    "directory": "itaque",
    "user": "eaque",
    "processes": 3,
    "start_secs": 52432713.44709943
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/daemons';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'description' => 'Voluptas culpa qui officia ipsam inventore nihil mollitia.',
            'command' => 'consequatur',
            'directory' => 'itaque',
            'user' => 'eaque',
            'processes' => 3.0,
            'start_secs' => 52432713.44709943,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/daemons'
payload = {
    "description": "Voluptas culpa qui officia ipsam inventore nihil mollitia.",
    "command": "consequatur",
    "directory": "itaque",
    "user": "eaque",
    "processes": 3,
    "start_secs": 52432713.44709943
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/daemons

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

description   string  optional  

Example: Voluptas culpa qui officia ipsam inventore nihil mollitia.

command   string   

Example: consequatur

directory   string  optional  

Example: itaque

user   string   

Example: eaque

processes   number   

Example: 3

start_secs   number   

Example: 52432713.447099

Delete a daemon configuration for a server.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/daemons/17" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/daemons/17"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/daemons/17';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/daemons/17'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/daemons/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the daemon. Example: 17

Synchronizes the firewall rules from the server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/rules/sync" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/rules/sync"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/rules/sync';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/rules/sync'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/rules/sync

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Retrieves a collection of Firewall Rules for a given Server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/rules" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/rules"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/rules';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/rules'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/rules

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Store a new Firewall Rule for a given Server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/rules" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"name\": \"jvlzwlsrrbmsfbx\",
    \"port\": \"animi\",
    \"type\": \"voluptas\",
    \"ip_address\": \"1.243.45.184\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/rules"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "name": "jvlzwlsrrbmsfbx",
    "port": "animi",
    "type": "voluptas",
    "ip_address": "1.243.45.184"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/rules';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'name' => 'jvlzwlsrrbmsfbx',
            'port' => 'animi',
            'type' => 'voluptas',
            'ip_address' => '1.243.45.184',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/rules'
payload = {
    "name": "jvlzwlsrrbmsfbx",
    "port": "animi",
    "type": "voluptas",
    "ip_address": "1.243.45.184"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/rules

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

name   string  optional  

The string must not be greater than 255 characters. Example: jvlzwlsrrbmsfbx

port   string   

Example: animi

type   string   

Example: voluptas

ip_address   string  optional  

This must be a valid IP address. Example: 1.243.45.184

Delete a Firewall Rule for a given Server.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/rules/510" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/rules/510"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/rules/510';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/rules/510'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/rules/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the rule. Example: 510

Retrieves a collection of schedules (cronjobs) for a given server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/schedules" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/schedules"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/schedules';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/schedules'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/schedules

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Store a new schedule (cronjob) for a given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/schedules" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"command\": \"ut\",
    \"user\": \"aliquid\",
    \"cron\": \"adipisci\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/schedules"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "command": "ut",
    "user": "aliquid",
    "cron": "adipisci"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/schedules';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'command' => 'ut',
            'user' => 'aliquid',
            'cron' => 'adipisci',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/schedules'
payload = {
    "command": "ut",
    "user": "aliquid",
    "cron": "adipisci"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/schedules

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

command   string   

Example: ut

user   string   

Example: aliquid

cron   string   

Example: adipisci

Update a schedule for a server.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/schedules/100733" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"command\": \"non\",
    \"user\": \"similique\",
    \"cron\": \"blanditiis\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/schedules/100733"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "command": "non",
    "user": "similique",
    "cron": "blanditiis"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/schedules/100733';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'command' => 'non',
            'user' => 'similique',
            'cron' => 'blanditiis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/schedules/100733'
payload = {
    "command": "non",
    "user": "similique",
    "cron": "blanditiis"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers/{server_id}/schedules/{id}

PATCH api/servers/{server_id}/schedules/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the schedule. Example: 100733

Body Parameters

command   string   

Example: non

user   string   

Example: similique

cron   string   

Example: blanditiis

Deletes a schedule (cronjob) for a given server.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/schedules/100733" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/schedules/100733"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/schedules/100733';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/schedules/100733'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/schedules/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the schedule. Example: 100733

Enable PHP Opcache for a server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/settings/php/opcache" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/settings/php/opcache"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/settings/php/opcache';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/settings/php/opcache'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/settings/php/opcache

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Disable PHP Opcache for a server.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/settings/php/opcache" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/settings/php/opcache"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/settings/php/opcache';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/settings/php/opcache'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/settings/php/opcache

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Updates the maximum file upload size for a server.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/settings/php/max-upload-size" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"max_file_upload_size\": 58
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/settings/php/max-upload-size"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "max_file_upload_size": 58
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/settings/php/max-upload-size';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'max_file_upload_size' => 58,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/settings/php/max-upload-size'
payload = {
    "max_file_upload_size": 58
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers/{server_id}/settings/php/max-upload-size

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

max_file_upload_size   number   

Must be at least 1. Example: 58

Update the maximum execution time for PHP.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/settings/php/max-execution-time" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"max_execution_time\": 74
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/settings/php/max-execution-time"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "max_execution_time": 74
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/settings/php/max-execution-time';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'max_execution_time' => 74,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/settings/php/max-execution-time'
payload = {
    "max_execution_time": 74
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers/{server_id}/settings/php/max-execution-time

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

max_execution_time   number   

Must be at least 1. Example: 74

Update the default PHP version of a server.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/php/cli" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"version\": \"eius\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/php/cli"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "version": "eius"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/php/cli';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'version' => 'eius',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/php/cli'
payload = {
    "version": "eius"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers/{server_id}/php/cli

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

version   string   

Example: eius

Clone Backup Configuration

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/backups/100952/clone" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"servers\": [
        13
    ],
    \"all_sites\": true,
    \"all_databases\": false
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/backups/100952/clone"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "servers": [
        13
    ],
    "all_sites": true,
    "all_databases": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/backups/100952/clone';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'servers' => [
                13,
            ],
            'all_sites' => true,
            'all_databases' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/backups/100952/clone'
payload = {
    "servers": [
        13
    ],
    "all_sites": true,
    "all_databases": false
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/backups/{backup_id}/clone

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

backup_id   integer   

The ID of the backup. Example: 100952

Body Parameters

servers   integer[]   
all_sites   boolean   

Example: true

all_databases   boolean   

Example: false

Retrieve a paginated list of backups for a given server, including associated sites and backup databases.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/backups" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/backups"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/backups';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/backups'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/backups

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Store a new backup for a server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/backups" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"code\": \"similique\",
    \"drive\": \"drive\",
    \"memo\": \"ipsam\",
    \"host\": \"ad\",
    \"user\": \"enim\",
    \"port\": \"quam\",
    \"auth_password\": \"deserunt\",
    \"ssh_password\": \"pariatur\",
    \"ssh_private_key\": \"sit\",
    \"ssh_passphrase\": \"veniam\",
    \"expression\": \"0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)\",
    \"cycle\": 8,
    \"all_sites\": true,
    \"excludes\": [
        \"ut\"
    ],
    \"sites\": [
        {
            \"id\": 19,
            \"excludes\": [
                \"similique\"
            ]
        }
    ],
    \"all_databases\": true,
    \"databases\": [
        3,
        7
    ]
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/backups"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "code": "similique",
    "drive": "drive",
    "memo": "ipsam",
    "host": "ad",
    "user": "enim",
    "port": "quam",
    "auth_password": "deserunt",
    "ssh_password": "pariatur",
    "ssh_private_key": "sit",
    "ssh_passphrase": "veniam",
    "expression": "0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)",
    "cycle": 8,
    "all_sites": true,
    "excludes": [
        "ut"
    ],
    "sites": [
        {
            "id": 19,
            "excludes": [
                "similique"
            ]
        }
    ],
    "all_databases": true,
    "databases": [
        3,
        7
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/backups';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'code' => 'similique',
            'drive' => 'drive',
            'memo' => 'ipsam',
            'host' => 'ad',
            'user' => 'enim',
            'port' => 'quam',
            'auth_password' => 'deserunt',
            'ssh_password' => 'pariatur',
            'ssh_private_key' => 'sit',
            'ssh_passphrase' => 'veniam',
            'expression' => '0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)',
            'cycle' => 8,
            'all_sites' => true,
            'excludes' => [
                'ut',
            ],
            'sites' => [
                [
                    'id' => 19,
                    'excludes' => [
                        'similique',
                    ],
                ],
            ],
            'all_databases' => true,
            'databases' => [
                3,
                7,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/backups'
payload = {
    "code": "similique",
    "drive": "drive",
    "memo": "ipsam",
    "host": "ad",
    "user": "enim",
    "port": "quam",
    "auth_password": "deserunt",
    "ssh_password": "pariatur",
    "ssh_private_key": "sit",
    "ssh_passphrase": "veniam",
    "expression": "0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)",
    "cycle": 8,
    "all_sites": true,
    "excludes": [
        "ut"
    ],
    "sites": [
        {
            "id": 19,
            "excludes": [
                "similique"
            ]
        }
    ],
    "all_databases": true,
    "databases": [
        3,
        7
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/backups

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

code   string   

AccessToken code lấy từ việc cấp quyền truy cập vào drive đang chọn Sao lưu dữ liệu Example: similique

drive   string   

Drive muốn sao lưu, giá trị là một trong drive, onedrive, dropbox, sftp. Example: drive

memo   string   

Tên cấu hình gợi nhớ Example: ipsam

host   SFTP  optional  

IP Adress or Domain name Example: ad

user   SFTP  optional  

Username Example: enim

port   SFTP  optional  

PORT Example: quam

auth_password   SFTP  optional  

Determind authenticate SFTP using password or private key Example: deserunt

ssh_password   SFTP  optional  

ssh password Example: pariatur

ssh_private_key   SFTP  optional  

ssh private key Example: sit

ssh_passphrase   SFTP  optional  

ssh private key passphrase Example: veniam

expression   string   

Biểu thức lịch trình sao lưu. Example: 0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)

cycle   integer   

Chu kỳ sao lưu, xóa các tệp cũ giữ lại các tệp trong khoảng thời gian {cycle} ngày. Example: 8

all_sites   boolean   

Có hay không sao lưu toàn bộ trang web Example: true

excludes   string[]  optional  

Danh sách các thư mục sẽ bỏ qua khi sao lưu áp dụng cho tất cả trang web nếu all_sites = true

sites   object[]  optional  

Danh sách các trang web sẽ sao lưu

id   integer  optional  

ID của trang web Example: 19

excludes   string[]  optional  

Danh sách các thư mục của trang web sẽ bỏ qua khi sao lưu. Nếu all_sites = true thì danh sách này sẽ được lấy từ tham số chung excludes Nếu all_sites = false thì mỗi trang web sẽ được cấu hình độc lập các thư mục sẽ bỏ qua khi sao lưu

all_databases   boolean   

Có hay không sao chép toàn bộ cơ sở dữ liệu Example: true

databases   integer[]  optional  

Danh sách id các cơ sở dữ liệu sẽ được sao lưu. Nếu all_databases = true thì sẽ lấy toàn bộ CSDL của máy chủ. Ngược lại all_databases = false thì sẽ chọn các CSDL muốn sao lưu.

Update backup configuration.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/backups/100952" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"is_active\": false,
    \"memo\": \"praesentium\",
    \"expression\": \"0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)\",
    \"cycle\": 14,
    \"all_sites\": false,
    \"excludes\": [
        \"nisi\"
    ],
    \"sites\": [
        {
            \"id\": 6,
            \"excludes\": [
                \"et\"
            ]
        }
    ],
    \"all_databases\": false,
    \"databases\": [
        3,
        7
    ]
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/backups/100952"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "is_active": false,
    "memo": "praesentium",
    "expression": "0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)",
    "cycle": 14,
    "all_sites": false,
    "excludes": [
        "nisi"
    ],
    "sites": [
        {
            "id": 6,
            "excludes": [
                "et"
            ]
        }
    ],
    "all_databases": false,
    "databases": [
        3,
        7
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/backups/100952';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'is_active' => false,
            'memo' => 'praesentium',
            'expression' => '0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)',
            'cycle' => 14,
            'all_sites' => false,
            'excludes' => [
                'nisi',
            ],
            'sites' => [
                [
                    'id' => 6,
                    'excludes' => [
                        'et',
                    ],
                ],
            ],
            'all_databases' => false,
            'databases' => [
                3,
                7,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/backups/100952'
payload = {
    "is_active": false,
    "memo": "praesentium",
    "expression": "0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)",
    "cycle": 14,
    "all_sites": false,
    "excludes": [
        "nisi"
    ],
    "sites": [
        {
            "id": 6,
            "excludes": [
                "et"
            ]
        }
    ],
    "all_databases": false,
    "databases": [
        3,
        7
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers/{server_id}/backups/{id}

PATCH api/servers/{server_id}/backups/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the backup. Example: 100952

Body Parameters

is_active   boolean   

Có kích hoạt cấu hình sao lưu hay không Example: false

memo   string   

Tên cấu hình gợi nhớ Example: praesentium

expression   string   

Biểu thức lịch trình sao lưu. Example: 0 0 * * * (Chạy sao lưu vào lúc 00:00 mỗi ngày)

cycle   integer   

Chu kỳ sao lưu, xóa các tệp cũ giữ lại các tệp trong khoảng thời gian {cycle} ngày. Example: 14

all_sites   boolean   

Có hay không sao lưu toàn bộ trang web Example: false

excludes   string[]  optional  

Danh sách các thư mục sẽ bỏ qua khi sao lưu áp dụng cho tất cả trang web nếu all_sites = true

sites   object[]  optional  

Danh sách các trang web sẽ sao lưu

id   integer  optional  

ID của trang web Example: 6

excludes   string[]  optional  

Danh sách các thư mục của trang web sẽ bỏ qua khi sao lưu. Nếu all_sites = true thì danh sách này sẽ được lấy từ tham số chung excludes Nếu all_sites = false thì mỗi trang web sẽ được cấu hình độc lập các thư mục sẽ bỏ qua khi sao lưu

all_databases   boolean   

Có hay không sao chép toàn bộ cơ sở dữ liệu Example: false

databases   integer[]  optional  

Danh sách id các cơ sở dữ liệu sẽ được sao lưu. Nếu all_databases = true thì sẽ lấy toàn bộ CSDL của máy chủ. Ngược lại all_databases = false thì sẽ chọn các CSDL muốn sao lưu.

Delete backup configuration

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/backups/100952" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/backups/100952"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/backups/100952';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/backups/100952'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/backups/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the backup. Example: 100952

Retrieve the backup history for a given server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/backup-histories" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/backup-histories"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/backup-histories';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/backup-histories'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/backup-histories

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Start the application on the given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/applications/1/start" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/applications/1/start"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/applications/1/start';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/applications/1/start'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/applications/{application_id}/start

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

application_id   integer   

The ID of the application. Example: 1

Stop the application on the given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/applications/1/stop" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/applications/1/stop"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/applications/1/stop';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/applications/1/stop'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/applications/{application_id}/stop

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

application_id   integer   

The ID of the application. Example: 1

Restart the application on the given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/applications/1/restart" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/applications/1/restart"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/applications/1/restart';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/applications/1/restart'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/applications/{application_id}/restart

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

application_id   integer   

The ID of the application. Example: 1

Update Openlitespeed Admin Username/Password

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/applications/1/ols-admin-update" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"admin_username\": \"rgflrzmk\",
    \"admin_password\": \"wpvhzdhdgsvuxmckmcvmdwsnpnufnqpjaspkqmfaejimjsdrapmmgxzcmglxuuuledtzoojz\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/applications/1/ols-admin-update"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "admin_username": "rgflrzmk",
    "admin_password": "wpvhzdhdgsvuxmckmcvmdwsnpnufnqpjaspkqmfaejimjsdrapmmgxzcmglxuuuledtzoojz"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/applications/1/ols-admin-update';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'admin_username' => 'rgflrzmk',
            'admin_password' => 'wpvhzdhdgsvuxmckmcvmdwsnpnufnqpjaspkqmfaejimjsdrapmmgxzcmglxuuuledtzoojz',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/applications/1/ols-admin-update'
payload = {
    "admin_username": "rgflrzmk",
    "admin_password": "wpvhzdhdgsvuxmckmcvmdwsnpnufnqpjaspkqmfaejimjsdrapmmgxzcmglxuuuledtzoojz"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/applications/{application_id}/ols-admin-update

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

application_id   integer   

The ID of the application. Example: 1

Body Parameters

admin_username   string   

The string must be at least 1 character. Example: rgflrzmk

admin_password   string   

The string must be at least 6 characters. Example: wpvhzdhdgsvuxmckmcvmdwsnpnufnqpjaspkqmfaejimjsdrapmmgxzcmglxuuuledtzoojz

Retrieves a collection of applications based on the provided request parameters and server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/applications" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"extension\": \"xzrykuvgxwdvmdqlhqerjavzqehwlivshhknwbcdfbsdtbczfhsbwhemtkrbszxnzdwws\",
    \"binary_name\": \"nvrtyldtzhvjjzxghxtkttdzvkiraubgoznseyvwyazhzofznjqtsxdfmqrcqnfjyckchwlkpeavdfowplwlrp\",
    \"os_version\": 3748387.346430571
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/applications"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "extension": "xzrykuvgxwdvmdqlhqerjavzqehwlivshhknwbcdfbsdtbczfhsbwhemtkrbszxnzdwws",
    "binary_name": "nvrtyldtzhvjjzxghxtkttdzvkiraubgoznseyvwyazhzofznjqtsxdfmqrcqnfjyckchwlkpeavdfowplwlrp",
    "os_version": 3748387.346430571
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/applications';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'extension' => 'xzrykuvgxwdvmdqlhqerjavzqehwlivshhknwbcdfbsdtbczfhsbwhemtkrbszxnzdwws',
            'binary_name' => 'nvrtyldtzhvjjzxghxtkttdzvkiraubgoznseyvwyazhzofznjqtsxdfmqrcqnfjyckchwlkpeavdfowplwlrp',
            'os_version' => 3748387.346430571,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/applications'
payload = {
    "extension": "xzrykuvgxwdvmdqlhqerjavzqehwlivshhknwbcdfbsdtbczfhsbwhemtkrbszxnzdwws",
    "binary_name": "nvrtyldtzhvjjzxghxtkttdzvkiraubgoznseyvwyazhzofznjqtsxdfmqrcqnfjyckchwlkpeavdfowplwlrp",
    "os_version": 3748387.346430571
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Request   

GET api/servers/{server_id}/applications

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

extension   string  optional  

The string must be at least 1 character. Example: xzrykuvgxwdvmdqlhqerjavzqehwlivshhknwbcdfbsdtbczfhsbwhemtkrbszxnzdwws

binary_name   string  optional  

The string must be at least 1 character. Example: nvrtyldtzhvjjzxghxtkttdzvkiraubgoznseyvwyazhzofznjqtsxdfmqrcqnfjyckchwlkpeavdfowplwlrp

os_version   number  optional  

Example: 3748387.3464306

Installs an application on a server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/applications" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"app_id\": \"ID ứng dụng PHP 8.3 là app_id=4432\",
    \"version\": \"8.3\",
    \"passowrd\": \"ut\",
    \"port\": \"8108\",
    \"manager_password\": \"dicta\",
    \"admin_password\": \"iusto\",
    \"admin_username\": \"numquam\",
    \"ui_port\": \"consequatur\",
    \"api_port\": \"molestias\",
    \"user\": \"saepe\",
    \"password\": \"*ft6`+7~Uw$|(D3\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/applications"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "app_id": "ID ứng dụng PHP 8.3 là app_id=4432",
    "version": "8.3",
    "passowrd": "ut",
    "port": "8108",
    "manager_password": "dicta",
    "admin_password": "iusto",
    "admin_username": "numquam",
    "ui_port": "consequatur",
    "api_port": "molestias",
    "user": "saepe",
    "password": "*ft6`+7~Uw$|(D3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/applications';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'app_id' => 'ID ứng dụng PHP 8.3 là app_id=4432',
            'version' => '8.3',
            'passowrd' => 'ut',
            'port' => '8108',
            'manager_password' => 'dicta',
            'admin_password' => 'iusto',
            'admin_username' => 'numquam',
            'ui_port' => 'consequatur',
            'api_port' => 'molestias',
            'user' => 'saepe',
            'password' => '*ft6`+7~Uw$|(D3',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/applications'
payload = {
    "app_id": "ID ứng dụng PHP 8.3 là app_id=4432",
    "version": "8.3",
    "passowrd": "ut",
    "port": "8108",
    "manager_password": "dicta",
    "admin_password": "iusto",
    "admin_username": "numquam",
    "ui_port": "consequatur",
    "api_port": "molestias",
    "user": "saepe",
    "password": "*ft6`+7~Uw$|(D3"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/applications

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

app_id   int|min:1   

ID của ứng dụng. Example: ID ứng dụng PHP 8.3 là app_id=4432

version   string   

Phiên bản của ứng dụng. Example: 8.3

passowrd   string|min:6   

(Cấu hình dịch vụ MeiliSearch | TypenseServer).
-MeiliSearch: Master Key dùng để bảo mật ứng dụng meilisearch
-TypesenseServer: Cấu hình api-key khi khởi động cho phép mọi hoạt động. Example: ut

port   int|min:1|max:65535   

(Cấu hình dịch vụ MeiliSearch | TypenseServer).
-MeiliSearch: Cổng mà dịch vụ meilisearch lắng nghe. Mặc định: 7700. Example: 7700
-TypesenseServer: Cổng mà dịch vụ API Typesense lắng nghe. Mặc định: 8108. Example: 8108

manager_password   string|min:6   

(Cấu hình dịch vụ ApacheTomcat) Mật khẩu cho user manager, role manager-gui Example: dicta

admin_password   string|min:6   

(Cấu hình dịch vụ ApacheTomcat|OpenLiteSpeed).
-ApacheTomcat: Mật khẩu cho user admin, role admin-gui
-OpenLiteSpeed: Mật khẩu cho user admin Example: iusto

admin_username   string|min:1   

(Cấu hình dịch vụ OpenLiteSpeed) Mật khẩu người dùng admin. Example: numquam

ui_port   required|int|min:1|max:65535|not_in:80,443,2022,22   

(Cấu hình dịch vụ MinIO) Địa chỉ IP và cổng mà bảng điều khiển MinIO sẽ lắng nghe Example: consequatur

api_port   required|int|min:1|max:65535|not_in:80,443,2022,22   

(Cấu hình dịch vụ MinIO) Cổng mà dịch vụ MinIO sẽ lắng nghe Example: molestias

user   required|string|min:1   

(Cấu hình dịch vụ MinIO) Tên người dùng cho tài khoản quản trị viên của MinIO Example: saepe

password   required|string|min:6   

(Cấu hình dịch vụ MinIO | PostgreSQL)
-MinIO: Mật khẩu người dùng cho tài khoản quản trị viên của MinIO
-PostgreSQL: Mật khẩu người dùng PostgreSQL Example: *ft6+7~Uw$|(D3`

Delete an application from a server.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/applications/1" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/applications/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/applications/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/applications/1'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/applications/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the application. Example: 1

Retrieves the data usage for a given server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/users/usage" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/users/usage"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/users/usage';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/users/usage'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/users/usage

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Synchronizes the system users from the server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/users/sync" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/users/sync"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/users/sync';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/users/sync'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/users/sync

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Retrieves a collection of system user resources for the given server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/users" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/users"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/users';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/users'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/users

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Store a new system user.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/users" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"name\": \"hdhthyrjhxxbhwvnmobjnczi\",
    \"password\": \"Ed5hL;7cUT{P~)5=G<-\",
    \"can_ssh\": false,
    \"can_ftp\": false
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/users"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "name": "hdhthyrjhxxbhwvnmobjnczi",
    "password": "Ed5hL;7cUT{P~)5=G<-",
    "can_ssh": false,
    "can_ftp": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/users';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'name' => 'hdhthyrjhxxbhwvnmobjnczi',
            'password' => 'Ed5hL;7cUT{P~)5=G<-',
            'can_ssh' => false,
            'can_ftp' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/users'
payload = {
    "name": "hdhthyrjhxxbhwvnmobjnczi",
    "password": "Ed5hL;7cUT{P~)5=G<-",
    "can_ssh": false,
    "can_ftp": false
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/users

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

name   string   

Must contain only letters, numbers, dashes and underscores. The string must not be greater than 32 characters. Example: hdhthyrjhxxbhwvnmobjnczi

password   string   

Example: Ed5hL;7cUT{P~)5=G<-

can_ssh   boolean   

Example: false

can_ftp   boolean   

Example: false

Update the specified user's SSH and FTP permissions.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/users/100772" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"can_ssh\": false,
    \"can_ftp\": false
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/users/100772"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "can_ssh": false,
    "can_ftp": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/users/100772';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'can_ssh' => false,
            'can_ftp' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/users/100772'
payload = {
    "can_ssh": false,
    "can_ftp": false
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers/{server_id}/users/{id}

PATCH api/servers/{server_id}/users/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the user. Example: 100772

Body Parameters

can_ssh   boolean   

Example: false

can_ftp   boolean   

Example: false

Deletes a system user.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/users/100772" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/users/100772"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/users/100772';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/users/100772'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/users/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the user. Example: 100772

Clean system

requires authentication

The system will clean unnecessary things like system logs, cache generated by applications.

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/clean" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/clean"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/clean';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/clean'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/clean

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Retrieves a list of all timezone

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/timezone" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/timezone"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/timezone';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/timezone'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/timezone

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Update the timezone for the server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/timezone" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"timezone\": \"voluptatem\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/timezone"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "timezone": "voluptatem"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/timezone';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'timezone' => 'voluptatem',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/timezone'
payload = {
    "timezone": "voluptatem"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/timezone

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

timezone   string   

Example: voluptatem

Updates the SSH configuration for a server.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/sshd_config" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"port\": 3,
    \"password\": true
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/sshd_config"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "port": 3,
    "password": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/sshd_config';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'port' => 3,
            'password' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/sshd_config'
payload = {
    "port": 3,
    "password": true
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers/{server_id}/sshd_config

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

port   number   

Must not be one of 80, 443, or 2022 Must be at least 1. Must not be greater than 65535. Example: 3

password   boolean   

Example: true

Retrieves the SSH keys associated with a given server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/ssh-keys" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/ssh-keys"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/ssh-keys';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/ssh-keys'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/ssh-keys

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Store a new SSH key for a given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/ssh-keys" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"name\": \"qui\",
    \"user\": \"et\",
    \"public_key\": \"laudantium\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/ssh-keys"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "name": "qui",
    "user": "et",
    "public_key": "laudantium"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/ssh-keys';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'name' => 'qui',
            'user' => 'et',
            'public_key' => 'laudantium',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/ssh-keys'
payload = {
    "name": "qui",
    "user": "et",
    "public_key": "laudantium"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/ssh-keys

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

name   string   

Example: qui

user   string   

Example: et

public_key   string   

Example: laudantium

Deletes an SSH key associated with a server.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/ssh-keys/animi" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/ssh-keys/animi"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/ssh-keys/animi';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/ssh-keys/animi'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/ssh-keys/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   string   

The ID of the ssh key. Example: animi

Backup a database.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/databases/427/backup" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/databases/427/backup"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/databases/427/backup';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/databases/427/backup'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/databases/{database_id}/backup

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

database_id   integer   

The ID of the database. Example: 427

Imports data into a database.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/databases/427/import" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"path\": \"quia\",
    \"remove\": false
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/databases/427/import"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "path": "quia",
    "remove": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/databases/427/import';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'path' => 'quia',
            'remove' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/databases/427/import'
payload = {
    "path": "quia",
    "remove": false
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/databases/{database_id}/import

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

database_id   integer   

The ID of the database. Example: 427

Body Parameters

path   string   

Example: quia

remove   boolean  optional  

Example: false

Downloads a backup file for the given server and database.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/databases/427/download" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/databases/427/download"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/databases/427/download';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/databases/427/download'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/databases/{database_id}/download

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

database_id   integer   

The ID of the database. Example: 427

Retrieves the latest databases associated with a given server, including their users.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/databases" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/databases"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/databases';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/databases'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/databases

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Store a new database for a given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/databases" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"type\": \"expedita\",
    \"name\": \"qdi-zoe_u\",
    \"users\": [
        1
    ]
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/databases"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "type": "expedita",
    "name": "qdi-zoe_u",
    "users": [
        1
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/databases';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'type' => 'expedita',
            'name' => 'qdi-zoe_u',
            'users' => [
                1,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/databases'
payload = {
    "type": "expedita",
    "name": "qdi-zoe_u",
    "users": [
        1
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/databases

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

type   string   

Example: expedita

name   string   

Must contain only letters, numbers, dashes and underscores. Example: qdi-zoe_u

users   integer[]  optional  

Updates a database for a given server.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/databases/427" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"type\": \"quibusdam\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/databases/427"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "type": "quibusdam"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/databases/427';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'type' => 'quibusdam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/databases/427'
payload = {
    "type": "quibusdam"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers/{server_id}/databases/{id}

PATCH api/servers/{server_id}/databases/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the database. Example: 427

Body Parameters

type   string   

Example: quibusdam

users   object  optional  

Deletes a database from the database management system.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/databases/427" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/databases/427"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/databases/427';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/databases/427'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/databases/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the database. Example: 427

Synchronizes the database users for a given server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/database-users/sync" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"type\": \"inventore\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/database-users/sync"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "type": "inventore"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/database-users/sync';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'type' => 'inventore',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/database-users/sync'
payload = {
    "type": "inventore"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Request   

GET api/servers/{server_id}/database-users/sync

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

type   string   

Example: inventore

Retrieves the database users associated with a server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/database-users" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/database-users"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/database-users';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/database-users'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/database-users

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Store a new database user for a given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/database-users" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"type\": \"et\",
    \"name\": \"puwhx\",
    \"password\": \"e;;%IZg\",
    \"databases\": [
        20
    ],
    \"access_anywhere\": false,
    \"roles\": [
        {
            \"id\": 4,
            \"roles\": [
                \"qvnhwjxrzsggajcmlwseomiopnkxapawzzdpqfiuitzxw\"
            ]
        }
    ]
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/database-users"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "type": "et",
    "name": "puwhx",
    "password": "e;;%IZg",
    "databases": [
        20
    ],
    "access_anywhere": false,
    "roles": [
        {
            "id": 4,
            "roles": [
                "qvnhwjxrzsggajcmlwseomiopnkxapawzzdpqfiuitzxw"
            ]
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/database-users';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'type' => 'et',
            'name' => 'puwhx',
            'password' => 'e;;%IZg',
            'databases' => [
                20,
            ],
            'access_anywhere' => false,
            'roles' => [
                [
                    'id' => 4,
                    'roles' => [
                        'qvnhwjxrzsggajcmlwseomiopnkxapawzzdpqfiuitzxw',
                    ],
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/database-users'
payload = {
    "type": "et",
    "name": "puwhx",
    "password": "e;;%IZg",
    "databases": [
        20
    ],
    "access_anywhere": false,
    "roles": [
        {
            "id": 4,
            "roles": [
                "qvnhwjxrzsggajcmlwseomiopnkxapawzzdpqfiuitzxw"
            ]
        }
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/database-users

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

type   string   

Example: et

name   string   

Must contain only letters, numbers, dashes and underscores. The string must not be greater than 32 characters. Example: puwhx

password   string   

Example: e;;%IZg

databases   integer[]  optional  
roles   object[]  optional  
id   integer  optional  

Example: 4

roles   string[]   

The string must be at least 1 character.

access_anywhere   boolean  optional  

Example: false

Update a database user for a given server.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/database-users/15" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"type\": \"in\",
    \"password\": \"U>d7)2}r\\\\;wS\",
    \"databases\": [
        15
    ],
    \"access_anywhere\": false,
    \"roles\": [
        {
            \"id\": 6,
            \"roles\": [
                \"xuaayaxxnrtgvnclytbvjcwyuicwvvzyovp\"
            ]
        }
    ]
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/database-users/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "type": "in",
    "password": "U>d7)2}r\\;wS",
    "databases": [
        15
    ],
    "access_anywhere": false,
    "roles": [
        {
            "id": 6,
            "roles": [
                "xuaayaxxnrtgvnclytbvjcwyuicwvvzyovp"
            ]
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/database-users/15';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'type' => 'in',
            'password' => 'U>d7)2}r\\;wS',
            'databases' => [
                15,
            ],
            'access_anywhere' => false,
            'roles' => [
                [
                    'id' => 6,
                    'roles' => [
                        'xuaayaxxnrtgvnclytbvjcwyuicwvvzyovp',
                    ],
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/database-users/15'
payload = {
    "type": "in",
    "password": "U>d7)2}r\\;wS",
    "databases": [
        15
    ],
    "access_anywhere": false,
    "roles": [
        {
            "id": 6,
            "roles": [
                "xuaayaxxnrtgvnclytbvjcwyuicwvvzyovp"
            ]
        }
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers/{server_id}/database-users/{id}

PATCH api/servers/{server_id}/database-users/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the database user. Example: 15

Body Parameters

type   string   

Example: in

password   string  optional  

Example: U>d7)2}r\;wS

databases   integer[]  optional  
roles   object[]  optional  
id   integer  optional  

Example: 6

roles   string[]   

The string must be at least 1 character.

access_anywhere   boolean  optional  

Example: false

Deletes a database user for a given server.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/database-users/19" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/database-users/19"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/database-users/19';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/database-users/19'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/database-users/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the database user. Example: 19

Key for SSH console

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/ssh" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/ssh"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/ssh';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/ssh'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/ssh

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Get the default page of a server.

requires authentication

The default page is an HTML static file that is created when a new website is created. When you access the newly created website, the default interface is displayed.

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/default-page" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/default-page"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/default-page';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/default-page'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/default-page

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Update the default page of a server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/default-page" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"default_page\": \"magnam\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/default-page"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "default_page": "magnam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/default-page';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'default_page' => 'magnam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/default-page'
payload = {
    "default_page": "magnam"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/default-page

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

default_page   string   

Example: magnam

Share the server with the given teams.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/share" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"teams\": [
        11
    ]
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/share"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "teams": [
        11
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/share';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'teams' => [
                11,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/share'
payload = {
    "teams": [
        11
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/share

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

teams   integer[]  optional  

Grant root access to the server.

requires authentication

Because of some reasons, the system cannot access the server to manage it, so you need to grant root access again.

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/grant-root" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"private_key\": \"vero\",
    \"password\": \"\'5~t&!ge\\\\\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/grant-root"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "private_key": "vero",
    "password": "'5~t&!ge\\"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/grant-root';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'private_key' => 'vero',
            'password' => '\'5~t&!ge\\',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/grant-root'
payload = {
    "private_key": "vero",
    "password": "'5~t&!ge\\"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/grant-root

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

private_key   string   

Example: vero

password   string   

Example: '5~t&!ge\

Perform a normal restart on the given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/restart/normal" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/restart/normal"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/restart/normal';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/restart/normal'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/restart/normal

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Hard Restart Server

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/restart/hard" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/restart/hard"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/restart/hard';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/restart/hard'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/restart/hard

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Reinstalls a server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/reinstall" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/reinstall"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/reinstall';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/reinstall'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/reinstall

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Updates the root password for a server.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/root-password" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"user\": \"nnplfochvwpk\",
    \"root_password\": \"jlmjcmuvyre\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/root-password"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "user": "nnplfochvwpk",
    "root_password": "jlmjcmuvyre"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/root-password';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'user' => 'nnplfochvwpk',
            'root_password' => 'jlmjcmuvyre',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/root-password'
payload = {
    "user": "nnplfochvwpk",
    "root_password": "jlmjcmuvyre"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/servers/{server_id}/root-password

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

user   string   

The string must not be greater than 256 characters. Example: nnplfochvwpk

root_password   string   

The string must not be greater than 256 characters. Example: jlmjcmuvyre

Enables the IonCubeLoader for a given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/ioncube/enable" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/ioncube/enable"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/ioncube/enable';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/ioncube/enable'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/ioncube/enable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Disables the IonCubeLoader for a given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/ioncube/disable" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/ioncube/disable"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/ioncube/disable';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/ioncube/disable'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/ioncube/disable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Calculate the amount of data used by the website directory

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/sites/usage" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/sites/usage"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/sites/usage';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/sites/usage'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/sites/usage

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Start the specified VPS service on the given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/services/3/start" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/services/3/start"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/services/3/start';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/services/3/start'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/services/{service_id}/start

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

service_id   integer   

The ID of the service. Example: 3

Stop the specified VPS service on the given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/services/9/stop" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/services/9/stop"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/services/9/stop';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/services/9/stop'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/services/{service_id}/stop

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

service_id   integer   

The ID of the service. Example: 9

Restart the specified VPS service on the given server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/services/13/restart" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/services/13/restart"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/services/13/restart';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/services/13/restart'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/services/{service_id}/restart

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

service_id   integer   

The ID of the service. Example: 13

Enable the specified VPS service to start on the given server at system boot.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/services/16/enable" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/services/16/enable"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/services/16/enable';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/services/16/enable'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/services/{service_id}/enable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

service_id   integer   

The ID of the service. Example: 16

Disable the specified VPS service from starting on the given server at system boot.

requires authentication

You will need to manually start the service each time the server boots.

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/services/7/disable" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/services/7/disable"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/services/7/disable';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/services/7/disable'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/services/{service_id}/disable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

service_id   integer   

The ID of the service. Example: 7

Synchronizes a VPS service with the server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/services/sync" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"name\": \"njcq\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/services/sync"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "name": "njcq"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/services/sync';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'name' => 'njcq',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/services/sync'
payload = {
    "name": "njcq"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/services/sync

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

name   string   

Must contain only letters, numbers, dashes and underscores. The string must not be greater than 32 characters. Example: njcq

Retrieves a list of VPS services associated with a server.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/services" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/services"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/services';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/services'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/services

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Store a new VPS service associated with a server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/services" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/services"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/services';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/services'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/servers/{server_id}/services

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Updates a VPS service.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/servers/282/services/6" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/services/6"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/services/6';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/services/6'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers)
response.json()

Request   

PUT api/servers/{server_id}/services/{id}

PATCH api/servers/{server_id}/services/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the service. Example: 6

Deletes a VPS service from the server.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/services/4" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/services/4"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/services/4';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/services/4'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/services/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the service. Example: 4

Download the WireGuard configuration

requires authentication

Downloads the WireGuard configuration file for the server.

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/wireguard/1/download" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/wireguard/1/download"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/wireguard/1/download';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/wireguard/1/download'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/wireguard/{wireguard_id}/download

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

wireguard_id   integer   

The ID of the wireguard. Example: 1

Get the list of wireguard clients

requires authentication

Retrieve the list of clients you have added to wireguard

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/servers/282/wireguard" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/wireguard"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/wireguard';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/wireguard'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/servers/{server_id}/wireguard

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Add a new WireGuard Client

requires authentication

Creates a new WireGuard client associated with the server.

Example request:
curl --request POST \
    "https://flashpanel.io/api/servers/282/wireguard" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"client_name\": \"epn\"
}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/wireguard"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "client_name": "epn"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/wireguard';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'client_name' => 'epn',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/wireguard'
payload = {
    "client_name": "epn"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/servers/{server_id}/wireguard

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Body Parameters

client_name   string   

Must contain only letters, numbers, dashes and underscores. The string must not be greater than 15 characters. Example: epn

Delete a client

requires authentication

Removes a client from the WireGuard server.

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/wireguard/1" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/wireguard/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/wireguard/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/wireguard/1'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/wireguard/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

id   integer   

The ID of the wireguard. Example: 1

WordPress Uninstall Auto Login

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/servers/282/wordpress/auto-login" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/servers/282/wordpress/auto-login"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/servers/282/wordpress/auto-login';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/servers/282/wordpress/auto-login'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/servers/{server_id}/wordpress/auto-login

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

server_id   integer   

The ID of the server. Example: 282

Creates a new site for the authenticated user.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"name\": \"et\",
    \"directory\": \"et\",
    \"username\": \"at\",
    \"password\": \"hJiSHSp(8M\",
    \"database_name\": \"blanditiis\",
    \"proxy_port\": 20,
    \"site_id\": 2,
    \"server_id\": 9,
    \"php_version\": \"php8.3\",
    \"widecards\": true
}"
const url = new URL(
    "https://flashpanel.io/api/sites"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "name": "et",
    "directory": "et",
    "username": "at",
    "password": "hJiSHSp(8M",
    "database_name": "blanditiis",
    "proxy_port": 20,
    "site_id": 2,
    "server_id": 9,
    "php_version": "php8.3",
    "widecards": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'name' => 'et',
            'directory' => 'et',
            'username' => 'at',
            'password' => 'hJiSHSp(8M',
            'database_name' => 'blanditiis',
            'proxy_port' => 20,
            'site_id' => 2,
            'server_id' => 9,
            'php_version' => 'php8.3',
            'widecards' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites'
payload = {
    "name": "et",
    "directory": "et",
    "username": "at",
    "password": "hJiSHSp(8M",
    "database_name": "blanditiis",
    "proxy_port": 20,
    "site_id": 2,
    "server_id": 9,
    "php_version": "php8.3",
    "widecards": true
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

Body Parameters

name   string   

Tên miền trang web Example: et

directory   string  optional  

Example: et

username   string  optional  

Tên người dùng cách ly trang web Example: at

password   string  optional  

Mật khẩu người dùng cách ly trang web Example: hJiSHSp(8M

database_name   string  optional  

Tên cơ sở dữ liệu, được tạo và gán cho máy chủ Example: blanditiis

proxy_port   integer  optional  

Example: 20

site_id   integer  optional  

ID của trang web nếu điền tức là tạo site alias cho trang web chính Example: 2

server_id   integer   

Example: 9

php_version   string  optional  

Phiên bản php cài cùng trang web. Example: php8.3

widecards   boolean  optional  

Bật wildcard tên miền con cho phép bạn có thể đặt điểm đến cho tất cả tên miền con không tồn tại về website hiện tại. Example: true

Retrieves and returns the data for the specified Site resource.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/101443" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/sites/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

id   integer   

The ID of the site. Example: 101443

Destroy a Site resource and its associated resources.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/101443" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"database\": false,
    \"database_user\": false
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "database": false,
    "database_user": false
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'database' => false,
            'database_user' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443'
payload = {
    "database": false,
    "database_user": false
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()

Request   

DELETE api/sites/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

id   integer   

The ID of the site. Example: 101443

Body Parameters

database   boolean  optional  

Giá trị true/false xác định có xóa cơ sở dữ liệu được gán cho trang web hay không Example: false

database_user   boolean  optional  

Giá trị true/false xác định có xóa người dùng cơ sở dữ liệu được gán cho trang web hay không Example: false

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

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/agent/token" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/agent/token"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/agent/token';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/agent/token'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/agent/token

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Checks the validity of the IP address of a given site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/ip-remote-check" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/ip-remote-check"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/ip-remote-check';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/ip-remote-check'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/ip-remote-check

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Updates the name of a Site based on the provided Request data.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/name" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"name\": \"consequuntur\",
    \"wildcards\": false,
    \"enable_redirect\": true,
    \"enable_redirect_ssl\": false,
    \"preferred_url\": \"assumenda\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/name"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "name": "consequuntur",
    "wildcards": false,
    "enable_redirect": true,
    "enable_redirect_ssl": false,
    "preferred_url": "assumenda"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/name';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'name' => 'consequuntur',
            'wildcards' => false,
            'enable_redirect' => true,
            'enable_redirect_ssl' => false,
            'preferred_url' => 'assumenda',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/name'
payload = {
    "name": "consequuntur",
    "wildcards": false,
    "enable_redirect": true,
    "enable_redirect_ssl": false,
    "preferred_url": "assumenda"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/sites/{site_id}/name

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

name   string   

Example: consequuntur

wildcards   boolean  optional  

Bật widecards tên miền con Example: false

enable_redirect   boolean   

Example: true

enable_redirect_ssl   boolean   

Example: false

preferred_url   string   

Example: assumenda

Toggles the favorite status of a site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/favorite" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/favorite"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/favorite';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/favorite'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/favorite

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Clone a site to a server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/clone" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"server_id\": \"nesciunt\",
    \"sites\": [
        \"et\"
    ],
    \"database\": true
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/clone"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "server_id": "nesciunt",
    "sites": [
        "et"
    ],
    "database": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/clone';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'server_id' => 'nesciunt',
            'sites' => [
                'et',
            ],
            'database' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/clone'
payload = {
    "server_id": "nesciunt",
    "sites": [
        "et"
    ],
    "database": true
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/clone

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

server_id   string   

Example: nesciunt

sites   string[]  optional  

Các dịa chỉ trang web mới được clone từ trang web hiện tại ra phân tách bởi dấu phẩy

database   boolean  optional  

Sao chép cơ sở dữ liệu hay không Example: true

Uninstalls the code for a given site.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/101443/uninstall" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"reset\": false
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/uninstall"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "reset": false
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/uninstall';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'reset' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/uninstall'
payload = {
    "reset": false
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()

Request   

DELETE api/sites/{site_id}/uninstall

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

reset   boolean  optional  

Thiết lập mã nguồn trang web về trang web mặc định Example: false

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

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/chmod" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"permission\": \"weo\",
    \"type\": \"file\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/chmod"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "permission": "weo",
    "type": "file"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/chmod';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'permission' => 'weo',
            'type' => 'file',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/chmod'
payload = {
    "permission": "weo",
    "type": "file"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/chmod

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

permission   string   

The string must not be greater than 3 characters. Example: weo

type   string   

Example: file

Must be one of:
  • file
  • folder

Change the ownership of the root folder of a site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/chown" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/chown"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/chown';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/chown'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/chown

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Enable or Disable site

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/toggle" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"enabled\": false
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/toggle"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "enabled": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/toggle';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'enabled' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/toggle'
payload = {
    "enabled": false
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/toggle

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

enabled   boolean   

Example: false

Updates the owner of the site.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/owner" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"username\": \"s\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/owner"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "username": "s"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/owner';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'username' => 's',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/owner'
payload = {
    "username": "s"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/sites/{site_id}/owner

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

username   string  optional  

Must contain only letters, numbers, dashes and underscores. Must not be one of root The string must not be greater than 32 characters. Example: s

Updates the web directory of a site

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/directory" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"directory\": \"placeat\",
    \"sync\": false
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/directory"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "directory": "placeat",
    "sync": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/directory';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'directory' => 'placeat',
            'sync' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/directory'
payload = {
    "directory": "placeat",
    "sync": false
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/sites/{site_id}/directory

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

directory   string  optional  

Đường dẫn thư mục mới Example: placeat

sync   boolean  optional  

abandon Không dùng nữa Example: false

Update the Git repository for a given site.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/repository" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"provider\": \"repellendus\",
    \"repository\": \"oypi.git\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/repository"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "provider": "repellendus",
    "repository": "oypi.git"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/repository';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'provider' => 'repellendus',
            'repository' => 'oypi.git',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/repository'
payload = {
    "provider": "repellendus",
    "repository": "oypi.git"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/sites/{site_id}/repository

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

provider   string   

Example: repellendus

repository   string   

Must end with one of .git. Example: oypi.git

Updates the git branch for the site.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/branch" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"branch\": \"ab\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/branch"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "branch": "ab"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/branch';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'branch' => 'ab',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/branch'
payload = {
    "branch": "ab"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/sites/{site_id}/branch

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

branch   string   

Example: ab

Update the PHP version for a given site.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/php_version" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"php_version\": \"phpiota\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/php_version"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "php_version": "phpiota"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/php_version';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'php_version' => 'phpiota',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/php_version'
payload = {
    "php_version": "phpiota"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/sites/{site_id}/php_version

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

php_version   string   

Must start with one of php. Example: phpiota

Sets the code type of a site to custom.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/type" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"type\": \"laravel\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/type"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "type": "laravel"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/type';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'type' => 'laravel',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/type'
payload = {
    "type": "laravel"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/sites/{site_id}/type

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

type   string   

Example: laravel

Must be one of:
  • custom
  • laravel
  • wordpress

Update the proxy port for a given site.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/proxy_port" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"proxy_port\": 3
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/proxy_port"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "proxy_port": 3
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/proxy_port';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'proxy_port' => 3,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/proxy_port'
payload = {
    "proxy_port": 3
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/sites/{site_id}/proxy_port

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

proxy_port   integer  optional  

Must be at least 1. Must not be greater than 65535. Example: 3

Installs phpMyAdmin for a given site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/phpmyadmin" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/phpmyadmin"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/phpmyadmin';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/phpmyadmin'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/phpmyadmin

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Upgrade phpMyAdmin for a given site.

requires authentication

Upgrades the phpMyAdmin version to the recommended one.

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/phpmyadmin" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/phpmyadmin"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/phpmyadmin';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/phpmyadmin'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers)
response.json()

Request   

PUT api/sites/{site_id}/phpmyadmin

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Installs WordPress code for a given site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/wordpress" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"version\": \"aut\",
    \"title\": \"modi\",
    \"username\": \"voluptatem\",
    \"password\": \"6k3u%w{e^(LWF=\",
    \"email\": \"[email protected]\",
    \"searchEngineOff\": false,
    \"user\": \"aspernatur\",
    \"database\": \"ab\",
    \"scripts\": \"repellendus\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/wordpress"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "version": "aut",
    "title": "modi",
    "username": "voluptatem",
    "password": "6k3u%w{e^(LWF=",
    "email": "[email protected]",
    "searchEngineOff": false,
    "user": "aspernatur",
    "database": "ab",
    "scripts": "repellendus"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/wordpress';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'version' => 'aut',
            'title' => 'modi',
            'username' => 'voluptatem',
            'password' => '6k3u%w{e^(LWF=',
            'email' => '[email protected]',
            'searchEngineOff' => false,
            'user' => 'aspernatur',
            'database' => 'ab',
            'scripts' => 'repellendus',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/wordpress'
payload = {
    "version": "aut",
    "title": "modi",
    "username": "voluptatem",
    "password": "6k3u%w{e^(LWF=",
    "email": "[email protected]",
    "searchEngineOff": false,
    "user": "aspernatur",
    "database": "ab",
    "scripts": "repellendus"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/wordpress

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

version   string  optional  

Example: aut

title   string   

Example: modi

username   string   

Example: voluptatem

password   string   

The string must be at least 8 characters. Example: 6k3u%w{e^(LWF=

email   string   

This must be a valid email address. Example: [email protected]

searchEngineOff   boolean   

Example: false

user   string  optional  

Tên người dùng cơ cở dữ liệu sẵn có trên máy chủ, nếu không điền thì hệ thống sẽ tự động tạo Example: aspernatur

database   string  optional  

Tên cơ sở dữ liệu sẵn có trên hệ thống, nếu không điền thì hệ thống sẽ tự động tạo Example: ab

scripts   string  optional  

Example: repellendus

Installs Git code for a given site from the GitHub provider.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/github" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"orgName\": \"Sample Organize\",
    \"repository\": \"[email protected]:sampleuser\\/samplerepo.git\",
    \"branch\": \"main\",
    \"composer_install\": true
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/github"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "orgName": "Sample Organize",
    "repository": "[email protected]:sampleuser\/samplerepo.git",
    "branch": "main",
    "composer_install": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/github';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'orgName' => 'Sample Organize',
            'repository' => '[email protected]:sampleuser/samplerepo.git',
            'branch' => 'main',
            'composer_install' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/github'
payload = {
    "orgName": "Sample Organize",
    "repository": "[email protected]:sampleuser\/samplerepo.git",
    "branch": "main",
    "composer_install": true
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/github

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

orgName   string  optional  

Tên của tổ chức. Example: Sample Organize

repository   string   

Tên SSH repository. Example: [email protected]:sampleuser/samplerepo.git

branch   string   

Tên nhánh github. Example: main

composer_install   boolean  optional  

Tự động cài đặt các thành phần phụ thuộc Composer (composer.json) Example: true

Installs Git code for a given site from the GitLab provider.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/gitlab" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"repository\": \"[email protected]:sampleuser\\/samplerepo.git\",
    \"branch\": \"main\",
    \"composer_install\": true
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/gitlab"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "repository": "[email protected]:sampleuser\/samplerepo.git",
    "branch": "main",
    "composer_install": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/gitlab';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'repository' => '[email protected]:sampleuser/samplerepo.git',
            'branch' => 'main',
            'composer_install' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/gitlab'
payload = {
    "repository": "[email protected]:sampleuser\/samplerepo.git",
    "branch": "main",
    "composer_install": true
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/gitlab

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

repository   string   

Tên SSH repository. Example: [email protected]:sampleuser/samplerepo.git

branch   string   

Tên nhánh gitlab. Example: main

composer_install   boolean  optional  

Tự động cài đặt các thành phần phụ thuộc Composer (composer.json) Example: true

Installs Bitbucket code for a given site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/bitbucket" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"repository\": \"[email protected]:sampleuser\\/samplerepo.git\",
    \"branch\": \"main\",
    \"composer_install\": false
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/bitbucket"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "repository": "[email protected]:sampleuser\/samplerepo.git",
    "branch": "main",
    "composer_install": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/bitbucket';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'repository' => '[email protected]:sampleuser/samplerepo.git',
            'branch' => 'main',
            'composer_install' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/bitbucket'
payload = {
    "repository": "[email protected]:sampleuser\/samplerepo.git",
    "branch": "main",
    "composer_install": false
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/bitbucket

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

repository   string   

Tên SSH repository. Example: [email protected]:sampleuser/samplerepo.git

branch   string   

Tên nhánh bitbucket. Example: main

composer_install   boolean  optional  

Tự động cài đặt các thành phần phụ thuộc Composer (composer.json) Example: false

Installs Git code for a given site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/git" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"repository\": \"[email protected]:sampleuser\\/samplerepo.git\",
    \"branch\": \"main\",
    \"composer_install\": true
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/git"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "repository": "[email protected]:sampleuser\/samplerepo.git",
    "branch": "main",
    "composer_install": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/git';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'repository' => '[email protected]:sampleuser/samplerepo.git',
            'branch' => 'main',
            'composer_install' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/git'
payload = {
    "repository": "[email protected]:sampleuser\/samplerepo.git",
    "branch": "main",
    "composer_install": true
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/git

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

repository   string   

Tên SSH repository. Example: [email protected]:sampleuser/samplerepo.git

branch   string   

Tên nhánh github. Example: main

composer_install   boolean  optional  

Tự động cài đặt các thành phần phụ thuộc Composer (composer.json) Example: true

Install Uptime Kuma Source Code

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/uptime-kuma" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"port\": 23
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/uptime-kuma"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "port": 23
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/uptime-kuma';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'port' => 23,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/uptime-kuma'
payload = {
    "port": 23
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/uptime-kuma

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

port   number   

Must be at least 1. Must not be greater than 65535. Example: 23

Install Imunify Antivirus Source Code

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/imunifyav" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"version\": \"stable\",
    \"key\": \"iste\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/imunifyav"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "version": "stable",
    "key": "iste"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/imunifyav';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'version' => 'stable',
            'key' => 'iste',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/imunifyav'
payload = {
    "version": "stable",
    "key": "iste"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/imunifyav

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

version   string   

Example: stable

Must be one of:
  • stable
  • beta
key   string  optional  

Example: iste

Install Chatwoot Source Code

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/chatwoot" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"port\": 4
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/chatwoot"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "port": 4
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/chatwoot';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'port' => 4,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/chatwoot'
payload = {
    "port": 4
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/chatwoot

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

port   number   

Must be at least 1. Must not be greater than 65535. Example: 4

Install N8n Source Code

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/n8n" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"port\": 17
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/n8n"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "port": 17
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/n8n';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'port' => 17,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/n8n'
payload = {
    "port": 17
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/n8n

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

port   number   

Must be at least 1. Must not be greater than 65535. Example: 17

Synchronizes the Web Server configuration for a given site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/sync" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/sync"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/sync';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/sync'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/sync

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Retrieves a paginated collection of deployments for a given site, along with their associated events.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/101443/deploys" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/deploys"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/deploys';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/deploys'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/sites/{site_id}/deploys

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Retrieves the list of default deployment script variables.

requires authentication

These variables are pre-defined by the system and are used in the deployment script.

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/101443/deploys/variables" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/deploys/variables"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/deploys/variables';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/deploys/variables'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/sites/{site_id}/deploys/variables

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Updates the deployment script for a given site.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/deploys/script" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"script\": \"et\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/deploys/script"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "script": "et"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/deploys/script';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'script' => 'et',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/deploys/script'
payload = {
    "script": "et"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/sites/{site_id}/deploys/script

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

script   string  optional  

Example: et

Deploy the latest source code

requires authentication

The system will run the deployment script configured for the application.

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/deploys/now" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/deploys/now"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/deploys/now';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/deploys/now'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/deploys/now

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Refreshes the deployment token for the given site.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/deploys/refresh-token" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/deploys/refresh-token"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/deploys/refresh-token';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/deploys/refresh-token'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers)
response.json()

Request   

PUT api/sites/{site_id}/deploys/refresh-token

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Enables or disables automatic deployment for a given site.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/deploys/auto" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/deploys/auto"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/deploys/auto';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/deploys/auto'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers)
response.json()

Request   

PUT api/sites/{site_id}/deploys/auto

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Store a new deploy key for a site.

requires authentication

This function automatically generates a new RSA private key and adds it to the site's server. The key is stored at /home/{siteLinuxUser}/.ssh/site_{site_id}.

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/deploys/key" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/deploys/key"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/deploys/key';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/deploys/key'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/deploys/key

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Deletes the deploy key for a given site.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/101443/deploys/key" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/deploys/key"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/deploys/key';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/deploys/key'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/sites/{site_id}/deploys/key

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

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

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/101443/commands" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/commands"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/commands';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/commands'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/sites/{site_id}/commands

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Store and Execute a new command for a site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/commands" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"script\": \"dolor\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/commands"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "script": "dolor"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/commands';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'script' => 'dolor',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/commands'
payload = {
    "script": "dolor"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/commands

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

script   string   

Example: dolor

Installs a free SSL certificate for a site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/free" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"client\": \"est\",
    \"auto_active\": true,
    \"account\": \"magni\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/certificates/free"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "client": "est",
    "auto_active": true,
    "account": "magni"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/certificates/free';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'client' => 'est',
            'auto_active' => true,
            'account' => 'magni',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/certificates/free'
payload = {
    "client": "est",
    "auto_active": true,
    "account": "magni"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/certificates/free

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

client   string   

Example: est

auto_active   boolean  optional  

Example: true

account   string  optional  

Example: magni

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

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/csr" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"city\": \"eveniet\",
    \"country\": \"p\",
    \"department\": \"voluptatum\",
    \"domain\": \"molestias\",
    \"organization\": \"perferendis\",
    \"state\": \"blanditiis\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/certificates/csr"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "city": "eveniet",
    "country": "p",
    "department": "voluptatum",
    "domain": "molestias",
    "organization": "perferendis",
    "state": "blanditiis"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/certificates/csr';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'city' => 'eveniet',
            'country' => 'p',
            'department' => 'voluptatum',
            'domain' => 'molestias',
            'organization' => 'perferendis',
            'state' => 'blanditiis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/certificates/csr'
payload = {
    "city": "eveniet",
    "country": "p",
    "department": "voluptatum",
    "domain": "molestias",
    "organization": "perferendis",
    "state": "blanditiis"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/certificates/csr

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

city   string   

Example: eveniet

country   string   

The string must not be greater than 2 characters. Example: p

department   string   

Example: voluptatum

domain   string   

Example: molestias

organization   string   

Example: perferendis

state   string   

Example: blanditiis

Imports an existing SSL certificate for a site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/import" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"certificate_key\": \"qui\",
    \"certificate_cert\": \"repudiandae\",
    \"auto_active\": true
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/certificates/import"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "certificate_key": "qui",
    "certificate_cert": "repudiandae",
    "auto_active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/certificates/import';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'certificate_key' => 'qui',
            'certificate_cert' => 'repudiandae',
            'auto_active' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/certificates/import'
payload = {
    "certificate_key": "qui",
    "certificate_cert": "repudiandae",
    "auto_active": true
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/certificates/import

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

certificate_key   string   

Example: qui

certificate_cert   string   

Example: repudiandae

auto_active   boolean   

Example: true

Clone a certificate for a site.

requires authentication

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

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/maiores/clone" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/certificates/maiores/clone"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/certificates/maiores/clone';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/certificates/maiores/clone'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/certificates/{certificate}/clone

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

certificate   string   

The certificate. Example: maiores

Installs a private key for a CSR.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/101126/install" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"certificate_cert\": \"maiores\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/certificates/101126/install"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "certificate_cert": "maiores"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/certificates/101126/install';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'certificate_cert' => 'maiores',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/certificates/101126/install'
payload = {
    "certificate_cert": "maiores"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/certificates/{certificate_id}/install

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

certificate_id   integer   

The ID of the certificate. Example: 101126

Body Parameters

certificate_cert   string   

Example: maiores

Activate a certificate for a Site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/101126/active" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/certificates/101126/active"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/certificates/101126/active';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/certificates/101126/active'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/certificates/{certificate_id}/active

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

certificate_id   integer   

The ID of the certificate. Example: 101126

Deactivates a certificate for a site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/certificates/101126/inactive" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/certificates/101126/inactive"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/certificates/101126/inactive';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/certificates/101126/inactive'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/certificates/{certificate_id}/inactive

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

certificate_id   integer   

The ID of the certificate. Example: 101126

Retrieves a paginated list of SSL certificates installed on a given site.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/101443/certificates" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/certificates"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/certificates';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/certificates'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/sites/{site_id}/certificates

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Delete a certificate for a site.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/101443/certificates/101126" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/certificates/101126"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/certificates/101126';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/certificates/101126'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/sites/{site_id}/certificates/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

id   integer   

The ID of the certificate. Example: 101126

Delete the Tiny File Manager for a given site.

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/101443/tiny-file-manager" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/tiny-file-manager"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/tiny-file-manager';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/tiny-file-manager'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/sites/{site_id}/tiny-file-manager

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

List of web server configurations

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/101443/configs" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"webserver\": \"maxime\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/configs"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "webserver": "maxime"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/configs';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'webserver' => 'maxime',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/configs'
payload = {
    "webserver": "maxime"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Request   

GET api/sites/{site_id}/configs

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

webserver   string   

Example: maxime

Add web server configuration

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/configs" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/configs"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/configs';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/configs'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/configs

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Update web server configuration

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/configs/1924" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/configs/1924"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/configs/1924';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/configs/1924'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers)
response.json()

Request   

PUT api/sites/{site_id}/configs/{id}

PATCH api/sites/{site_id}/configs/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

id   integer   

The ID of the config. Example: 1924

Delete web server configuration

requires authentication

Example request:
curl --request DELETE \
    "https://flashpanel.io/api/sites/101443/configs/1924" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/configs/1924"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/configs/1924';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/configs/1924'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request   

DELETE api/sites/{site_id}/configs/{id}

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

id   integer   

The ID of the config. Example: 1924

Enable load balancing for a site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/balancing/enable" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/balancing/enable"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/balancing/enable';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/balancing/enable'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/balancing/enable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Disables load balancing for a given site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/balancing/disable" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/balancing/disable"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/balancing/disable';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/balancing/disable'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/balancing/disable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Store a new load balancing configuration for a given site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/balancing" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"method\": \"least_conn\",
    \"servers\": [
        {
            \"ip\": \"77.157.246.132\",
            \"port\": 6,
            \"weight\": 28,
            \"backup\": false,
            \"down\": true
        }
    ]
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/balancing"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "method": "least_conn",
    "servers": [
        {
            "ip": "77.157.246.132",
            "port": 6,
            "weight": 28,
            "backup": false,
            "down": true
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/balancing';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'method' => 'least_conn',
            'servers' => [
                [
                    'ip' => '77.157.246.132',
                    'port' => 6,
                    'weight' => 28,
                    'backup' => false,
                    'down' => true,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/balancing'
payload = {
    "method": "least_conn",
    "servers": [
        {
            "ip": "77.157.246.132",
            "port": 6,
            "weight": 28,
            "backup": false,
            "down": true
        }
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/balancing

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

method   string   

Example: least_conn

Must be one of:
  • round_robin
  • ip_hash
  • least_conn
servers   object[]  optional  
ip   string   

This must be a valid IP address. Example: 77.157.246.132

port   number   

Must be at least 1. Must not be greater than 65535. Example: 6

weight   number  optional  

Must be at least 1. Example: 28

backup   boolean  optional  

Example: false

down   boolean  optional  

Example: true

Disables the Telegram notification for a given site.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/notifications/telegram/disable" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/notifications/telegram/disable"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/notifications/telegram/disable';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/notifications/telegram/disable'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request   

POST api/sites/{site_id}/notifications/telegram/disable

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Optimize WordPress according to the desired optimization conditions

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/wordpress/optimization" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"optimizations\": [
        \"aliquam\"
    ]
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/wordpress/optimization"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "optimizations": [
        "aliquam"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/wordpress/optimization';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'optimizations' => [
                'aliquam',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/wordpress/optimization'
payload = {
    "optimizations": [
        "aliquam"
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/wordpress/optimization

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

optimizations   string[]   

Retrieves the optimization log for a WordPress site.

requires authentication

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/101443/wordpress/optimization/log" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/wordpress/optimization/log"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/wordpress/optimization/log';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/wordpress/optimization/log'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/sites/{site_id}/wordpress/optimization/log

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Enable or disable WordPress Rocket in the Nginx server.

requires authentication

Example request:
curl --request POST \
    "https://flashpanel.io/api/sites/101443/wordpress/wprocket" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"enable\": false
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/wordpress/wprocket"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "enable": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/wordpress/wprocket';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'enable' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/wordpress/wprocket'
payload = {
    "enable": false
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request   

POST api/sites/{site_id}/wordpress/wprocket

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

enable   boolean   

Example: false

Updates the WordPress user for a given site.

requires authentication

Example request:
curl --request PUT \
    "https://flashpanel.io/api/sites/101443/wordpress/user" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}" \
    --data "{
    \"wp_user\": \"eum\",
    \"wp_password\": \"et\"
}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/wordpress/user"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

let body = {
    "wp_user": "eum",
    "wp_password": "et"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/wordpress/user';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
        'json' => [
            'wp_user' => 'eum',
            'wp_password' => 'et',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/wordpress/user'
payload = {
    "wp_user": "eum",
    "wp_password": "et"
}
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request   

PUT api/sites/{site_id}/wordpress/user

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443

Body Parameters

wp_user   string   

Example: eum

wp_password   string   

Example: et

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

requires authentication

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

Example request:
curl --request GET \
    --get "https://flashpanel.io/api/sites/101443/wordpress/login" \
    --header "Authorization: Bearer {YOUR_TOKEN_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Code: {YOUR_CODE_KEY}"
const url = new URL(
    "https://flashpanel.io/api/sites/101443/wordpress/login"
);

const headers = {
    "Authorization": "Bearer {YOUR_TOKEN_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Code": "{YOUR_CODE_KEY}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://flashpanel.io/api/sites/101443/wordpress/login';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_TOKEN_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Code' => '{YOUR_CODE_KEY}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://flashpanel.io/api/sites/101443/wordpress/login'
headers = {
  'Authorization': 'Bearer {YOUR_TOKEN_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Code': '{YOUR_CODE_KEY}'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request   

GET api/sites/{site_id}/wordpress/login

Headers

Authorization      

Example: Bearer {YOUR_TOKEN_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Code      

Example: {YOUR_CODE_KEY}

URL Parameters

site_id   integer   

The ID of the site. Example: 101443