curl --request POST \
--url https://api.arct.cloud/v1/servers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "<string>",
"location": "<string>",
"plan": "<string>",
"image_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billing_period": "monthly",
"ssh_key_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"coupon_code": "<string>",
"enable_backups": false
}
'import requests
url = "https://api.arct.cloud/v1/servers"
payload = {
"hostname": "<string>",
"location": "<string>",
"plan": "<string>",
"image_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billing_period": "monthly",
"ssh_key_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"coupon_code": "<string>",
"enable_backups": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
hostname: '<string>',
location: '<string>',
plan: '<string>',
image_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
billing_period: 'monthly',
ssh_key_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
coupon_code: '<string>',
enable_backups: false
})
};
fetch('https://api.arct.cloud/v1/servers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_number": "<string>",
"status": "<string>",
"payment_method": "card",
"amount": 123,
"currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"server_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"server": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hostname": "<string>",
"status": "provisioning",
"location": "<string>",
"plan": "<string>",
"plan_name": "<string>",
"cpu_cores": 123,
"ram_gb": 123,
"storage_gb": 123,
"bandwidth_tb": 123,
"ipv4": "<string>",
"ipv6": "<string>",
"os": "<string>",
"login_user": "<string>",
"labels": [
"<string>"
],
"delete_protection": true,
"billing_period": "<string>",
"price": 123,
"next_due_date": "2023-12-25",
"cancel_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
},
"password": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Create a Server
Creates a server and charges the first billing period to your default card, else your first saved card. A saved card is required. Poll GET /servers/{server_id} until status is running.
curl --request POST \
--url https://api.arct.cloud/v1/servers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hostname": "<string>",
"location": "<string>",
"plan": "<string>",
"image_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billing_period": "monthly",
"ssh_key_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"coupon_code": "<string>",
"enable_backups": false
}
'import requests
url = "https://api.arct.cloud/v1/servers"
payload = {
"hostname": "<string>",
"location": "<string>",
"plan": "<string>",
"image_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"billing_period": "monthly",
"ssh_key_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"coupon_code": "<string>",
"enable_backups": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
hostname: '<string>',
location: '<string>',
plan: '<string>',
image_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
billing_period: 'monthly',
ssh_key_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
coupon_code: '<string>',
enable_backups: false
})
};
fetch('https://api.arct.cloud/v1/servers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_number": "<string>",
"status": "<string>",
"payment_method": "card",
"amount": 123,
"currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"server_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"server": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hostname": "<string>",
"status": "provisioning",
"location": "<string>",
"plan": "<string>",
"plan_name": "<string>",
"cpu_cores": 123,
"ram_gb": 123,
"storage_gb": 123,
"bandwidth_tb": 123,
"ipv4": "<string>",
"ipv6": "<string>",
"os": "<string>",
"login_user": "<string>",
"labels": [
"<string>"
],
"delete_protection": true,
"billing_period": "<string>",
"price": 123,
"next_due_date": "2023-12-25",
"cancel_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
},
"password": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
API token from Dashboard > Settings > API Tokens.
Body
RFC 1123 label. A name used by your servers or open orders returns 409 hostname_taken.
63^[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?$Location code from GET /locations, any case.
^[A-Za-z0-9-]{1,10}$Plan slug from GET /plans.
^[A-Za-z0-9][A-Za-z0-9_.-]{0,49}$Image ID from GET /images for the same location.
Pre-order locations take only semi_annual or yearly.
monthly, quarterly, semi_annual, yearly IDs of your SSH keys to install. Omit for all saved keys (a password if none); send [] for a password. Ignored for Windows images.
20Promo code.
1 - 64True adds automatic backups for 20% of the plan price, where backups_available is true.
Response
Successful Response
Show child attributes
Show child attributes
Null until the server is recorded.
Show child attributes
Show child attributes
Login password for server.login_user. Null when SSH keys are installed; also null at pre-order locations or for a delayed build, and then emailed. Shown only here and in the email. If support retries the build or Windows password setup fails, follow the email.