API manual

The PrivateFlare API allows you to work with domains. Interaction with the service is carried out using the HTTP REST API protocol. Request and result format is JSON. There is no limit on the number of requests.

Authorization

For authorization, you must pass the X-Auth-Key header with the value of the API key:

X-Auth-Key: meowyeVV9FEkGb2zRwNXetEeWVChrMky6Szz

To get an API key, click on your name in the upper right corner, select "Get API key" and copy the key.

API-key

Specification

Basic URL: https://api.privateflare.com

Request Path Description
GET /me User information
GET /domains/ Domains list
GET /domains/{domain} Details on the selected domain
POST /domains/ Create a new domain
PATCH /domains/{domain} Update domain settings
DELETE /domains/{domain} Delete domain

User information

URL: GET https://api.privateflare.com/me

The function returns information about the user, his balance and available slots.

Example request via CURL:

curl --location 'https://api.privateflare.com/me' \
--header 'X-Auth-Key: meowyeVV9FEkGb2zRwNXetEeWVChrMky6Szz'

Successful server responce example:

{
    "name": "Meow Nyan",
    "slot_limit": 1000,
    "slot_used": 1,
    "user_token": "wl3ezSTggb9vmtnW98O3iceqFX3GN52q",
    "balance": 1.0,
    "api_key": "meowyeVV9FEkGb2zRwNXetEeWVChrMky6Szz",
    "success": true
}

Error response example:

{
   "success": false,
   "msg": "invalid api key"
}

Domains list

URL: GET https://api.privateflare.com/domains/

The function returns a list of active domains in the domains field. Each domain is rendered as an object with the fields described in the next function.

Example request via CURL:

curl --location 'https://api.privateflare.com/domains/' \
--header 'X-Auth-Key: meowyeVV9FEkGb2zRwNXetEeWVChrMky6Szz'

Successful server responce example:

{
    "domains": [{
        "id": 12345,
        "enabled": true,
        "domain": "meow.life",
        "mask": "purr.me",
        "ssl": true,
        "backend": "51.15.14.88",
        "fhttps": true,
        "created": 1671273182,
        "online": true,
        "tags": [ "meow", "parked" ],
        "cachelevel": 0,
        "ratelimit": 1000,
        "serverheader": "",
        "imageconvert": false,
        "minify": false,
        "node": 123
    }],
    "success": true
}

Details on the selected domain

URL: GET https://api.privateflare.com/domains/{domain}

The function returns the data of the selected domain in the domain object with the fields:

Example request via CURL:

curl --location 'https://api.privateflare.com/domains/meow.life' \
--header 'X-Auth-Key: meowyeVV9FEkGb2zRwNXetEeWVChrMky6Szz'

Successful server responce example:

{
    "domain": {
        "id": 12345,
        "enabled": true,
        "domain": "meow.life",
        "mask": "purr.me",
        "ssl": true,
        "backend": "51.15.14.88",
        "fhttps": true,
        "created": 1671273182,
        "online": true,
        "tags": [ "meow", "parked" ],
        "cachelevel": 0,
        "ratelimit": 1000,
        "serverheader": "",
        "imageconvert": false,
        "minify": false,
        "node": 123
    },
    "success": true
}

Error response example:

{
    "success": false,
    "msg": "domain not exists"
}

Create a new domain

URL: POST https://api.privateflare.com/domains/

The function creates a new domain according to the specified data:

Example request via CURL:

curl --location 'https://api.privateflare.com/domains/' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Key: meowyeVV9FEkGb2zRwNXetEeWVChrMky6Szz' \
--data '{
    "enabled": true,
    "domain": "meow.life",
    "mask": "purr.me",
    "ssl": true,
    "backend": "51.15.14.88",
    "fhttps": true,
    "tags": [ "meow", "parked" ],
    "cachelevel": 1
}'

Successful server responce example:

{
    "success": true
}

Error response example:

{
    "success": false,
    "msg": "domain exists"
}

Update domain settings

URL: PATCH https://api.privateflare.com/domains/{domain}

The function changes the domain settings. The field list and submit methods are similar to the domain creation function. You can only pass the parameters you want to change.

Example request via CURL:

curl --location --request PATCH 'https://api.privateflare.com/domains/meow.life' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Key: meowyeVV9FEkGb2zRwNXetEeWVChrMky6Szz' \
--data '{
    "ssl": false,
    "fhttps": false,
    "cachelevel": 0
}'

Successful server responce example:

{
    "success": true
}

Error response example:

{
    "success": false,
    "msg": "domain not exists"
}

Delete domain

URL: DELETE https://api.privateflare.com/domains/{domain}

The function deletes a domain by its name.

Example request via CURL:

curl --location --request DELETE 'https://api.privateflare.com/domains/meow.life' \
--header 'X-Auth-Key: meowyeVV9FEkGb2zRwNXetEeWVChrMky6Szz'

Successful server responce example:

{
    "success": true
}

Error response example:

{
    "success": false,
    "msg": "domain not exists"
}