Dns


{info} In order to use our API DNS manager your domain must be with the following DNS servers: cns1.jump.bg and cns2.jump.bg

Action: addzone

Creates a DNS zone for domain

Params Description Required
domain Name of the DNS zone Yes
ip Valid ipv4 IP that will be assigned in the default records (@, www., mail, ftp) Yes

Request Parameters

$curl_url = 'https://api.jump.bg/api.php';

$curl_post = [
    'api_userid' => 'API_USER_ID',
    'api_password' => 'API_PASSWORD',
    'type' => 'dns',
    'action' => 'addzone',
    'domain' => 'example.com',
    'ip' => '11.12.13.14',
];

$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => $curl_url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => $curl_post,
]);

$response = curl_exec($curl);
curl_close($curl);

var_dump($response); //It will return the result in JSON

Response Parameters:

{
    "success": 1
}

Action: deletezone

Deletes a DNS zone for a domain

Params Description Required
domain Name of the DNS zone Yes

Request Parameters

$curl_url = 'https://api.jump.bg/api.php';

$curl_post = [
    'api_userid' => 'API_USER_ID',
    'api_password' => 'API_PASSWORD',
    'type' => 'dns',
    'action' => 'deletezone',
    'domain' => 'example.com',
];

$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => $curl_url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => $curl_post,
]);

$response = curl_exec($curl);
curl_close($curl);

var_dump($response); //It will return the result in JSON

Response Parameters:

{
    "success": 1
}

Action: addrecord

Creates a record for a certain dns zone

Params Description Required
domain Name of the DNS zone Yes
recordtype Type of the record. Can be NS, A, CNAME, MX or TXT Yes
name Name of the record (For example www) Yes
content Content of the record (For example: 12.13.14.15 for A record, cname.example.com for CNAME, mail.example.com for MX) Yes
priority Priority for the record. Required only for MX type of record No

{info} If you want to create the main record, you can use "@" as name or just the name of the domain

Request Parameters

$curl_url = 'https://api.jump.bg/api.php';

$curl_post = [
    'api_userid' => 'API_USER_ID',
    'api_password' => 'API_PASSWORD',
    'type' => 'dns',
    'action' => 'addrecord',
    'domain' => 'example.com',
    'recordtype' => 'A',
    'name' => 'www',
    'content' => '11.12.13.14',
];

$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => $curl_url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => $curl_post,
]);

$response = curl_exec($curl);
curl_close($curl);

var_dump($response); //It will return the result in JSON

Response Parameters:

{
    "success": 1
}

Action: deleterecord

Removes a record from a certain dns zone

Params Description Required
domain Name of the DNS zone Yes
line Number of the line record that have to be removed. Can be obtained thru #listrecords Yes

{warning} When removing a record, the next one will obtain the previous line number so be careful with running same request multiple times. Make sure that you will check the records in #listrecords before sending a deleterecord request again.

Request Parameters

$curl_url = 'https://api.jump.bg/api.php';

$curl_post = [
    'api_userid' => 'API_USER_ID',
    'api_password' => 'API_PASSWORD',
    'type' => 'dns',
    'action' => 'deleterecord',
    'domain' => 'example.com',
    'line' => 15,
];

$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => $curl_url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => $curl_post,
]);

$response = curl_exec($curl);
curl_close($curl);

var_dump($response); //It will return the result in JSON

Response Parameters:

{
    "success": 1
}

Action: listrecords

Removes a record from a certain dns zone

Params Description Required
domain Name of the DNS zone Yes

Request Parameters

$curl_url = 'https://api.jump.bg/api.php';

$curl_post = [
    'api_userid' => 'API_USER_ID',
    'api_password' => 'API_PASSWORD',
    'type' => 'dns',
    'action' => 'listrecords',
    'domain' => 'example.com',
];

$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => $curl_url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => $curl_post,
]);

$response = curl_exec($curl);
curl_close($curl);

var_dump($response); //It will return the result in JSON

Response Parameters:

{
    "success": 1,
    "records": {
        "example.com": [
            {
                "line": 4,
                "type": "NS",
                "name": "example.com.",
                "content": "cns1.jump.bg."
            },
            {
                "line": 5,
                "type": "NS",
                "name": "example.com.",
                "content": "cns2.jump.bg."
            },
            {
                "line": 6,
                "type": "A",
                "name": "example.com.",
                "content": "1.2.3.4"
            },
            {
                "line": 7,
                "type": "MX",
                "name": "example.com.",
                "priority": "0",
                "content": "example.com."
            },
            {
                "line": 8,
                "type": "CNAME",
                "name": "mail",
                "content": "example.com."
            }
        ]
    }
}