Domains

Manage your domains.



Get

HTTP Request

GET https://serverwand.com/api/domains        

Parameters

Parameter Value Description
Optional
server string
domain string

Sample Code

<?php
//post data
$data = array(
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true,
	"items":
	    [{
	        "id": "1",
	        "domain":  "example.com",
	        "server": "1",
	        "usage": "1024",
	        "ip": "0.0.0.0",
	        "mx": "mail.example.com"
	    }]
}
        



Create

HTTP Request

POST https://serverwand.com/api/domains/create        

Parameters

Parameter Value Description
Required
domain string
server string
password string

Sample Code

<?php
//post data
$data = array(
	'domain' => 'exmmple.com',
	'server' => '1',
	'password' => 'password',
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/create");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true
}
        



Summary

HTTP Request

GET https://serverwand.com/api/domains/{$domain_id}/summary        

Parameters

Parameter Value Description
Required

Sample Code

<?php
//post data
$data = array(
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/summary");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true,
	"item": [{
        "domain": example.com),
        "disk_usage": "1024"
        "dns": {
        	"A": "0.0.0.0",
        	"MX": "mail.example.com"
        },
        "server": {
        	"name": "my-server",
        	"ip": "0.0.0.0",
        	"dns": "custom"
        }
    }]
}
        



Settings

HTTP Request

GET https://serverwand.com/api/domains/{$domain_id}/settings        

Parameters

Parameter Value Description
Required

Sample Code

<?php
//post data
$data = array(
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/settings");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true,
	"item": [{
        "domain": example.com),
        "ssl": true
    }]
}
        



Set SSL

HTTP Request

POST https://serverwand.com/api/domains/{$domain_id}/setssl        

Parameters

Parameter Value Description
Required
status string

Sample Code

<?php
//post data
$data = array(
	'status' => 1
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/setssl");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true
}
        



Database

HTTP Request

GET https://serverwand.com/api/domains/{$domain_id}/database        

Parameters

Parameter Value Description
Required

Sample Code

<?php
//post data
$data = array(
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/database");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true,
	"item": [{
        "domain": example.com),
        "db_name": example_com,
        "server": {
        	"ip": "0.0.0.0"
        },
    }]
}
        



Save Database

HTTP Request

POST https://serverwand.com/api/domains/{$domain_id}/savedatabase        

Parameters

Parameter Value Description
Required
status string

Sample Code

<?php
//post data
$data = array(
	'password' => 'password'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/savedatabase");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true
}
        



Apps

HTTP Request

GET https://serverwand.com/api/domains/{$domain_id}/apps        

Parameters

Parameter Value Description
Required

Sample Code

<?php
//post data
$data = array(
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/apps");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true,
	"item": [{
        "domain": example.com),
        "app": {
        	"name": "wordpress",
        	"version": "1.0"
        },
    }]
}
        



Install

HTTP Request

GET https://serverwand.com/api/domains/{$domain_id}/install/{$app}        

Parameters

Parameter Value Description
Required

Sample Code

<?php
//post data
$data = array(
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/install/{$app}");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true
}
        



Aliases

HTTP Request

GET https://serverwand.com/api/domains/{$domain_id}/aliases        

Parameters

Parameter Value Description
Required

Sample Code

<?php
//post data
$data = array(
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/aliases");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true,
	"item": [{
        "domain": example.com),
        "aliases": [{
        	"domain": "example.org",
        	"dns": {
	        	"A": "0.0.0.0",
	        	"MX": "mail.example.com"
	        }
        }],
        "server": {
        	"name": "my-server",
        	"ip": "0.0.0.0",
        	"dns": "custom"
        },
    }]
}
        



Save Alias

HTTP Request

POST https://serverwand.com/api/domains/{$domain_id}/savealias        

Parameters

Parameter Value Description
Required
alias string

Sample Code

<?php
//post data
$data = array(
	'alias' => 'example.org'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/savealias");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true
}
        



Delete Alias

HTTP Request

POST https://serverwand.com/api/domains/{$domain_id}/deletealias        

Parameters

Parameter Value Description
Required
alias string

Sample Code

<?php
//post data
$data = array(
	'alias' => 'example.org'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/deletealias");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true
}
        



Email

HTTP Request

GET https://serverwand.com/api/domains/{$domain_id}/email        

Parameters

Parameter Value Description
Required

Sample Code

<?php
//post data
$data = array(
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/email");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true,
	"item": [{
        "domain": "example.com",
        "email": true,
        "emails": [{
        	"user": "info",
        	"destination": "forwarding@myemail.com"
        }],
        "server": {
        	"hostname": "example.com",
        	"dns": "custom"
        },
    }]
}
        



Set Email

HTTP Request

POST https://serverwand.com/api/domains/{$domain_id}/setemail        

Parameters

Parameter Value Description
Required
status string

Sample Code

<?php
//post data
$data = array(
	'status' => 1
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/setemail");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true
}
        



Save Email

HTTP Request

POST https://serverwand.com/api/domains/{$domain_id}/saveemail        

Parameters

Parameter Value Description
Required
user string
password string
destination string

Sample Code

<?php
//post data
$data = array(
	'user' => 'info',
	'password' => 'password',
	'destination' => 'forwarding@myemail.com'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/saveemail");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true
}
        



Delete Email

HTTP Request

POST https://serverwand.com/api/domains/{$domain_id}/deleteemail        

Parameters

Parameter Value Description
Required
user string

Sample Code

<?php
//post data
$data = array(
	'user' => 'info'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/deleteemail");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true
}
        



Download

HTTP Request

GET https://serverwand.com/api/domains/{$domain_id}/download        

Parameters

Parameter Value Description
Required

Sample Code

<?php
//post data
$data = array(
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/download");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true,
	"download_url": "http://0.0.0.0/backups/example.org.zip"
}
        



Delete

HTTP Request

GET https://serverwand.com/api/domains/{$domain_id}/delete        

Parameters

Parameter Value Description
Required

Sample Code

<?php
//post data
$data = array(
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://serverwand.com/api/domains/{$domain_id}/delete");
curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
    'Authorization: Bearer , "<?=$api_key;?>"
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);     

// receive server response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);        
curl_close ($ch);

print_r($result);
?>
        


Sample Response

{
	"success": true
}