Anonflare API

URL for requests: https://anonflare.com

Content type for requests: multipart/form-data

Authorization: To authorize each request, use your API key in the Bearer header. You can obtain your API key in your account settings.

GET /api/sites.list

Parameters:

No parameters.

PHP code example:

<?php
$url = 'https://anonflare.com/api/sites.list';
$token = 'YOUR_ACCESS_TOKEN';

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
    ],
    CURLOPT_CUSTOMREQUEST => 'GET',
]);

$response = curl_exec($ch);

if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
}

curl_close($ch);

echo $response;
?>

Examples of responses:

200:
{
    "domains": [
        {
            "id": "3544",
            "domain": "example.com",
            "ip": "1.2.3.4",
            "public_ip": "5.6.7.8",
            "sendproxy": 1,
            "wildcard": 0,
            "inc_port": "80",
            "out_port": "80",
            "inc_port_ssl": "443",
            "out_port_ssl": "443",
            "dns": 0,
            "checker_status": 1,
            "date": "1761987443"
        }
    ],
    "message": "OK",
    "code": 200
}
400:
{
    "message": "Error description",
    "code": 400
}
404:
{
    "message": "Not found",
    "code": 404
}
GET /api/site.info

Parameters:

Parameter Type Required Example Description
id String Yes 3544 Your website ID


PHP code example:

<?php
$params = [
'id' => '3544'
];

$query = http_build_query($params);

$url = 'https://anonflare.com/api/site.info?' . $query;
$token = 'YOUR_ACCESS_TOKEN';

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
    ],
    CURLOPT_CUSTOMREQUEST => 'GET',
]);

$response = curl_exec($ch);

if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
}

curl_close($ch);

echo $response;
?>

Examples of responses:

200:
{
    "domains": [
        {
            "id": "3544",
            "domain": "example.com",
            "ip": "1.2.3.4",
            "public_ip": "5.6.7.8",
            "sendproxy": 1,
            "wildcard": 0,
            "inc_port": "80",
            "out_port": "80",
            "inc_port_ssl": "443",
            "out_port_ssl": "443",
            "dns": 0,
            "checker_status": 1,
            "date": "1761987443"
        }
    ],
    "records": [
        {
            "id": "64sa4",
            "type": "A",
            "domain": "www",
            "value": "1.2.3.4",
            "inc_port": "80",
            "out_port": "80",
            "inc_port_ssl": "443",
            "out_port_ssl": "443"
        }
    ],
    "message": "OK",
    "code": 200
}
400:
{
    "message": "Error description",
    "code": 400
}
404:
{
    "message": "Not found",
    "code": 404
}
POST /api/site.add

Parameters:

Parameter Type Required Example Description
domain String Yes example.com Your website domain
ip String Yes 1.2.3.4 Your server's IP address
inc_port Array No [80] Incoming HTTP port.
You can skip this, and the default value of 80 will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'inc_port[]' => [80]
out_port Array No [80] Outgoing HTTP port.
You can skip this, and the default value of 80 will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'out_port[]' => [80]
inc_port_ssl Array No [443] Incoming HTTPS port.
You can leave it blank, in which case the default value of 443 will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'inc_port_ssl[]' => [443]
out_port_ssl Array No [443] Outgoing HTTPS port.
You can leave it blank, in which case the default value of 443 will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'out_port_ssl[]' => [443]
sendproxy Boolean No 0 Send-proxy. 0 - off, 1 - on.
You can skip this, and the default value of 0 will be used.
wildcard Boolean No 0 Wildcard. 0 - off, 1 - on.
You can skip this, and the default value of 0 will be used.
dns Number No 0 0 - DNSPOD.
You can skip this, and the default value of 0 will be used.


PHP code example:

<?php
$url = 'https://anonflare.com/api/site.add';
$token = 'YOUR_ACCESS_TOKEN';

$params = [
    'domain' => 'example.com',
    'ip' => '1.2.3.4',
    'wildcard' => 1
];

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $params,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
    ],
]);

$response = curl_exec($ch);

if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
}

curl_close($ch);

echo $response;
?>

Examples of responses:

200:
{
    "id": 3544,
    "message": "OK",
    "code": 200
}
400:
{
    "message": "Error description",
    "code": 400
}
POST /api/sites.import

Parameters:

Parameter Type Required Example Description
domains Array Yes ['example.com','test.com'] Website domains.
You need to explicitly specify the array. Example of a parameter in PHP: 'domains[]' => ['example.com','test.com']
ip String Yes 1.2.3.4 Your server's IP address
inc_port Array No [80] Incoming HTTP port.
You can skip this, and the default value of 80 will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'inc_port[]' => [80]
out_port Array No [80] Outgoing HTTP port.
You can skip this, and the default value of 80 will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'out_port[]' => [80]
inc_port_ssl Array No [443] Incoming HTTPS port.
You can leave it blank, in which case the default value of 443 will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'inc_port_ssl[]' => [443]
out_port_ssl Array No [443] Outgoing HTTPS port.
You can leave it blank, in which case the default value of 443 will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'out_port_ssl[]' => [443]
sendproxy Boolean No 0 Send-proxy. 0 - off, 1 - on.
You can skip this, and the default value of 0 will be used.
wildcard Boolean No 0 Wildcard. 0 - off, 1 - on.
You can skip this, and the default value of 0 will be used.
dns Number No 0 0 - DNSPOD.
You can skip this, and the default value of 0 will be used.


PHP code example:

<?php
$url = 'https://anonflare.com/api/sites.import';
$token = 'YOUR_ACCESS_TOKEN';

$params = [
    'domains[]' => ['example.com','test.com'],
    'ip' => '1.2.3.4',
    'wildcard' => 1
];

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $params,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
    ],
]);

$response = curl_exec($ch);

if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
}

curl_close($ch);

echo $response;
?>

Examples of responses:

200:
{
    "message": "OK",
    "code": 200
}
400:
{
    "message": "Error description",
    "code": 400
}
409:
{
    "message": "Import is already running",
    "code": 409
}
POST /api/site.update

Parameters:

Parameter Type Required Example Description
id String Yes 3544 Website ID
ip String Yes 1.2.3.4 Your server's IP address.
It will automatically update in all A-records on the site.
inc_port Array No [80] Incoming HTTP port.
You can choose not to transfer it, in which case the current value will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'inc_port[]' => [80]
out_port Array No [80] Outgoing HTTP port.
You can choose not to transfer it, in which case the current value will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'out_port[]' => [80]
inc_port_ssl Array No [443] Incoming HTTPS port.
You can choose not to transfer it, in which case the current value will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'inc_port_ssl[]' => [443]
out_port_ssl Array No [443] Outgoing HTTPS port.
You can choose not to transfer it, in which case the current value will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'out_port_ssl[]' => [443]
sendproxy Boolean No 0 Send-proxy. 0 - off, 1 - on.
You can skip this, and the current value will be used.
wildcard Boolean No 0 Wildcard. 0 - off, 1 - on.
You can skip this, and the current value will be used.
dns Number No 0 0 - DNSPOD.
You can skip this, and the current value will be used.


PHP code example:

<?php
$url = 'https://anonflare.com/api/site.update';
$token = 'YOUR_ACCESS_TOKEN';

$params = [
    'id' => '3544',
    'ip' => '1.2.3.4',
    'wildcard' => 1
];

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $params,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
    ],
]);

$response = curl_exec($ch);

if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
}

curl_close($ch);

echo $response;
?>

Examples of responses:

200:
{
    "message": "OK",
    "code": 200
}
400:
{
    "message": "Error description",
    "code": 400
}
404:
{
    "message": "Not found",
    "code": 404
}
POST /api/sites.update

Parameters:

Parameter Type Required Example Description
ids Array Yes ['3544','7238'] Website IDs
You need to explicitly specify the array. Example of a parameter in PHP: 'ids[]' => ['3544','7238']
ip String Yes 1.2.3.4 Your server's IP address.
It will automatically update in all A-records on the site.
inc_port Array No [80] Incoming HTTP port.
You can choose not to transfer it, in which case the current value will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'inc_port[]' => [80]
out_port Array No [80] Outgoing HTTP port.
You can choose not to transfer it, in which case the current value will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'out_port[]' => [80]
inc_port_ssl Array No [443] Incoming HTTPS port.
You can choose not to transfer it, in which case the current value will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'inc_port_ssl[]' => [443]
out_port_ssl Array No [443] Outgoing HTTPS port.
You can choose not to transfer it, in which case the current value will be used.
You need to explicitly specify the array. Example of a parameter in PHP: 'out_port_ssl[]' => [443]
sendproxy Boolean No 0 Send-proxy. 0 - off, 1 - on.
You can skip this, and the current value will be used.
wildcard Boolean No 0 Wildcard. 0 - off, 1 - on.
You can skip this, and the current value will be used.
dns Number No 0 0 - DNSPOD.
You can skip this, and the current value will be used.


PHP code example:

<?php
$url = 'https://anonflare.com/api/sites.update';
$token = 'YOUR_ACCESS_TOKEN';

$params = [
    'ids[]' => ['3544','7238'],
    'ip' => '1.2.3.4',
    'wildcard' => 1
];

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $params,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
    ],
]);

$response = curl_exec($ch);

if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
}

curl_close($ch);

echo $response;
?>

Examples of responses:

200:
{
    "message": "OK",
    "code": 200
}
400:
{
    "message": "Error description",
    "code": 400
}
404:
{
    "message": "Not found",
    "code": 404
}
POST /api/site.delete

Parameters:

Parameter Type Required Example Description
id String Yes 3544 Website ID


PHP code example:

<?php
$url = 'https://anonflare.com/api/site.delete';
$token = 'YOUR_ACCESS_TOKEN';

$params = [
    'id' => '3544'
];

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $params,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
    ],
]);

$response = curl_exec($ch);

if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
}

curl_close($ch);

echo $response;
?>

Examples of responses:

200:
{
    "message": "OK",
    "code": 200
}
400:
{
    "message": "Error description",
    "code": 400
}
404:
{
    "message": "Not found",
    "code": 404
}
POST /api/sites.delete

Parameters:

Parameter Type Required Example Description
ids Array Yes ['3544','7238'] Website IDs.
You need to explicitly specify the array. Example of a parameter in PHP: 'ids[]' => ['3544','7238']


PHP code example:

<?php
$url = 'https://anonflare.com/api/sites.delete';
$token = 'YOUR_ACCESS_TOKEN';

$params = [
    'ids[]' => ['3544','7238']
];

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $params,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
    ],
]);

$response = curl_exec($ch);

if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
}

curl_close($ch);

echo $response;
?>

Examples of responses:

200:
{
    "message": "OK",
    "code": 200
}
400:
{
    "message": "Error description",
    "code": 400
}
404:
{
    "message": "Not found",
    "code": 404
}
GET /api/record.info

Parameters:

Parameter Type Required Example Description
id String Yes 64sa4 Record ID


PHP code example:

<?php
$params = [
'id' => '64sa4'
];

$query = http_build_query($params);

$url = 'https://anonflare.com/api/record.info?' . $query;
$token = 'YOUR_ACCESS_TOKEN';

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
    ],
    CURLOPT_CUSTOMREQUEST => 'GET',
]);

$response = curl_exec($ch);

if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
}

curl_close($ch);

echo $response;
?>

Examples of responses:

200:
{
    "records": [
        {
            "id": "64sa4",
            "type": "A",
            "domain": "www",
            "value": "1.2.3.4",
            "inc_port": "80",
            "out_port": "80",
            "inc_port_ssl": "443",
            "out_port_ssl": "443"
        }
    ],
    "message": "OK",
    "code": 200
}
400:
{
    "message": "Error description",
    "code": 400
}
404:
{
    "message": "Not found",
    "code": 404
}
POST /api/record.add

Parameters:

Parameter Type Required Example Description
id String Yes 3544 The ID of the site to which you are adding the record.
type String Yes A
CNAME
TXT
MX
Record type. Use one of the values specified in the example.
domain String Yes www Subdomain. Examples: www, subdomain, @
value String Yes 1.2.3.4 Record value. Can be an IP address or any other string, depending on the record type.
inc_port String No 80 Incoming HTTP port. Only required when creating an A record.
You can skip this, and the default value of 80 will be used.
out_port String No 80 Outgoing HTTP port. Only required when creating an A record.
You can skip this, and the default value of 80 will be used.
inc_port_ssl String No 443 Incoming HTTPS port. Only required when creating an A record.
You can leave it blank, in which case the default value of 443 will be used.
out_port_ssl String No 443 Outgoing HTTPS port. Only required when creating an A record.
You can leave it blank, in which case the default value of 443 will be used.


PHP code example:

<?php
$url = 'https://anonflare.com/api/record.add';
$token = 'YOUR_ACCESS_TOKEN';

$params = [
    'id' => '3544',
    'type' => 'A',
    'domain' => 'www',
    'value' => '1.2.3.4'
];

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $params,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
    ],
]);

$response = curl_exec($ch);

if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
}

curl_close($ch);

echo $response;
?>

Examples of responses:

200:
{
    "id": 64sa4,
    "message": "OK",
    "code": 200
}
400:
{
    "message": "Error description",
    "code": 400
}
404:
{
    "message": "Not found",
    "code": 404
}
POST /api/record.update

Parameters:

Parameter Type Required Example Description
id String Yes 64sa4 Record ID.
type String Yes A
CNAME
TXT
MX
Record type. Use one of the values specified in the example.
domain String Yes www Subdomain. Examples: www, subdomain, @
value String Yes 1.2.3.4 Record value. Can be an IP address or any other string, depending on the record type.
inc_port String No 80 Incoming HTTP port. Only required when creating an A record.
You can skip this, and the default value of 80 will be used.
out_port String No 80 Outgoing HTTP port. Only required when creating an A record.
You can skip this, and the default value of 80 will be used.
inc_port_ssl String No 443 Incoming HTTPS port. Only required when creating an A record.
You can leave it blank, in which case the default value of 443 will be used.
out_port_ssl String No 443 Outgoing HTTPS port. Only required when creating an A record.
You can leave it blank, in which case the default value of 443 will be used.


PHP code example:

<?php
$url = 'https://anonflare.com/api/record.update';
$token = 'YOUR_ACCESS_TOKEN';

$params = [
    'id' => '64sa4',
    'type' => 'A',
    'domain' => 'www',
    'value' => '1.2.3.4'
];

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $params,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
    ],
]);

$response = curl_exec($ch);

if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
}

curl_close($ch);

echo $response;
?>

Examples of responses:

200:
{
    "message": "OK",
    "code": 200
}
400:
{
    "message": "Error description",
    "code": 400
}
404:
{
    "message": "Not found",
    "code": 404
}
POST /api/record.delete

Parameters:

Parameter Type Required Example Description
id String Yes 64sa4 Record ID


PHP code example:

<?php
$url = 'https://anonflare.com/api/record.delete';
$token = 'YOUR_ACCESS_TOKEN';

$params = [
    'id' => '64sa4'
];

$ch = curl_init($url);

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $params,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $token,
    ],
]);

$response = curl_exec($ch);

if ($response === false) {
    echo 'cURL error: ' . curl_error($ch);
}

curl_close($ch);

echo $response;
?>

Examples of responses:

200:
{
    "message": "OK",
    "code": 200
}
400:
{
    "message": "Error description",
    "code": 400
}
404:
{
    "message": "Not found",
    "code": 404
}