Buy a specific in-stock dedicated server
curl --request POST \
--url https://my.server.express/api/v1/client/dedicated/buy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenantosId": "<string>",
"hostname": "<string>",
"profileId": 123,
"rootPassword": "<string>",
"sshKeys": [
"<string>"
],
"couponCode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenantosId: '<string>',
hostname: '<string>',
profileId: 123,
rootPassword: '<string>',
sshKeys: ['<string>'],
couponCode: '<string>'
})
};
fetch('https://my.server.express/api/v1/client/dedicated/buy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/client/dedicated/buy"
payload = {
"tenantosId": "<string>",
"hostname": "<string>",
"profileId": 123,
"rootPassword": "<string>",
"sshKeys": ["<string>"],
"couponCode": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"serviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceNumber": "<string>",
"total": 123,
"currency": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>",
"data": {
"billingDetailsRequired": true,
"missing": [
"addressLine1"
]
}
}{
"success": false,
"error": "<string>"
}Dedicated
Buy a specific in-stock dedicated server
The one-off path: a TenantOS machine sitting in stock rather than a plan. Re-reads the machine from TenantOS to confirm it’s still for sale and to take its price, applies any reseller discount and coupon, then creates a PENDING monthly service and an UNPAID invoice due in 7 days. The root password is sealed, never stored in the clear. The OS install is a work order for staff. Writes a BUY_DEDICATED audit log entry and notifies staff on Discord and Telegram. A coupon that ran out between quote and commit returns 409. Unexpected failures return 500 with the underlying error message. Requires a complete billing address (428).
POST
/
v1
/
client
/
dedicated
/
buy
Buy a specific in-stock dedicated server
curl --request POST \
--url https://my.server.express/api/v1/client/dedicated/buy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenantosId": "<string>",
"hostname": "<string>",
"profileId": 123,
"rootPassword": "<string>",
"sshKeys": [
"<string>"
],
"couponCode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenantosId: '<string>',
hostname: '<string>',
profileId: 123,
rootPassword: '<string>',
sshKeys: ['<string>'],
couponCode: '<string>'
})
};
fetch('https://my.server.express/api/v1/client/dedicated/buy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/client/dedicated/buy"
payload = {
"tenantosId": "<string>",
"hostname": "<string>",
"profileId": 123,
"rootPassword": "<string>",
"sshKeys": ["<string>"],
"couponCode": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"serviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceNumber": "<string>",
"total": 123,
"currency": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>",
"data": {
"billingDetailsRequired": true,
"missing": [
"addressLine1"
]
}
}{
"success": false,
"error": "<string>"
}Authorizations
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Body
application/json