API / Method reference / Renting and renewing
Renting and renewing
The service list, renting, renewing and changing plans.
Base URL:
https://sourhost.net/api/v1·Auth: Authorization: Bearer sh_live_…GET
/projects/:id/services— A project's servicesPOST/projects/:id/services— Rent a game serverPOST/projects/:id/services/:serviceId/extend— Renew a servicePOST/projects/:id/services/extend-all— Renew all of a project's serversGET/projects/:id/services/:serviceId/plan-options— Plan change optionsPOST/projects/:id/services/:serviceId/plan— Change the planPOST/projects/:id/services/fastdl— Rent FastDLPOST/projects/:id/services/dedicated-ip— Rent a dedicated IPDELETE/projects/:id/services/:serviceId— Delete a serviceGET
/projects/:id/servicesA project's services
Servers, FastDL, dedicated IPs: status, address, price, next payment.
Scope:
servers:readParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
Example request
curl "https://sourhost.net/api/v1/projects/12/services" \
-H "Authorization: Bearer $SOURHOST_TOKEN"Response
HTTP
HTTP/2 200 OK
{
"items": [
{
"id": "34",
"type": "game_server",
"name": "Retake #1",
"game": "Counter-Strike 2",
"tariff": "CS2 · 16 слотов",
"location": "Германия · Франкфурт",
"status": "active",
"powerState": "running",
"address": "203.0.113.10:27015",
"price": 300,
"billingMonths": 1,
"nextPayment": "2026-12-01"
}
]
}POST
/projects/:id/servicesRent a game server
Take the options from GET /catalog. Send with preview: true first to get the price.
Scope:
billing:spendSpends money · needs an Idempotency-KeyParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
gameIdrequired | body · string | Game from the catalog |
moderequired | body · string | tariff, slots or builder |
locationId / nodeIdrequired | body · string | Location and node from the catalog |
tariffCode / slots / cores, ramMb, ssdGb | body · string / number | The plan for the chosen mode |
months | body · number | 1, 3, 6 or 12; default: the current term |
preview | body · boolean | true: only quote the price, charge nothing |
Example request
curl -X POST "https://sourhost.net/api/v1/projects/12/services" \
-H "Authorization: Bearer $SOURHOST_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: extend-34-2026-11" \
-d '{"gameId":"cs2","mode":"tariff","locationId":"de","nodeId":"de-n3","tariffCode":"cs2-16","months":1,"preview":true}'Response
HTTP
HTTP/2 200 OK
{
"total": 300,
"server": 300,
"fastdl": 0,
"months": 1,
"monthly": 300,
"name": "CS2 · 16 слотов"
}Method errors
| 409 | node_full | No room on the node |
| 409 | ip_sold_out | No free dedicated IPs |
| 400 | idempotency_key_required | No Idempotency-Key header |
| 402 | insufficient_balance | Not enough money on the balance |
| 403 | token_spend_limit | Would exceed the token’s spending limit |
| 409 | idempotency_in_progress | A request with this key is still running |
POST
/projects/:id/services/:serviceId/extendRenew a service
Scope:
billing:spendSpends money · needs an Idempotency-KeyParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
serviceIdrequired | path · string | Service number (from GET /projects/:id/services) |
months | body · number | 1, 3, 6 or 12; default: the current term |
preview | body · boolean | true: only quote the price, charge nothing |
Example request
curl -X POST "https://sourhost.net/api/v1/projects/12/services/34/extend" \
-H "Authorization: Bearer $SOURHOST_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: extend-34-2026-11" \
-d '{"months":3,"preview":true}'Response
HTTP
HTTP/2 200 OK
{
"total": 855,
"monthly": 285,
"base": 300
}Method errors
| 400 | idempotency_key_required | No Idempotency-Key header |
| 402 | insufficient_balance | Not enough money on the balance |
| 403 | token_spend_limit | Would exceed the token’s spending limit |
| 409 | idempotency_in_progress | A request with this key is still running |
POST
/projects/:id/services/extend-allRenew all of a project's servers
Scope:
billing:spendSpends money · needs an Idempotency-KeyParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
months | body · number | 1, 3, 6 or 12; default: the current term |
preview | body · boolean | true: only quote the price, charge nothing |
Example request
curl -X POST "https://sourhost.net/api/v1/projects/12/services/extend-all" \
-H "Authorization: Bearer $SOURHOST_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: extend-34-2026-11" \
-d '{"preview":true}'Response
HTTP
HTTP/2 200 OK
{
"items": [
{
"id": "34",
"total": 300,
"monthly": 300,
"base": 300
}
]
}Method errors
| 400 | idempotency_key_required | No Idempotency-Key header |
| 402 | insufficient_balance | Not enough money on the balance |
| 403 | token_spend_limit | Would exceed the token’s spending limit |
| 409 | idempotency_in_progress | A request with this key is still running |
GET
/projects/:id/services/:serviceId/plan-optionsPlan change options
Scope:
servers:readParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
serviceIdrequired | path · string | Service number (from GET /projects/:id/services) |
Example request
curl "https://sourhost.net/api/v1/projects/12/services/34/plan-options" \
-H "Authorization: Bearer $SOURHOST_TOKEN"Response
204 Empty response
POST
/projects/:id/services/:serviceId/planChange the plan
The difference for the rest of the term is charged or credited at once. The server must be stopped.
Scope:
billing:spendSpends money · needs an Idempotency-KeyParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
serviceIdrequired | path · string | Service number (from GET /projects/:id/services) |
moderequired | body · string | tariff, slots or builder |
tariffCode / slots / cores, ramMb, ssdGb | body · string / number | The new plan |
preview | body · boolean | true: only quote the price, charge nothing |
Example request
curl -X POST "https://sourhost.net/api/v1/projects/12/services/34/plan" \
-H "Authorization: Bearer $SOURHOST_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: extend-34-2026-11" \
-d '{"mode":"tariff","tariffCode":"cs2-24","preview":true}'Response
HTTP
HTTP/2 200 OK
{
"tariff": "CS2 · 24 слота",
"price": 420,
"chargeOrCredit": 96,
"daysLeft": 24,
"nextPaymentAt": "2026-12-01"
}Method errors
| 400 | idempotency_key_required | No Idempotency-Key header |
| 402 | insufficient_balance | Not enough money on the balance |
| 403 | token_spend_limit | Would exceed the token’s spending limit |
| 409 | idempotency_in_progress | A request with this key is still running |
POST
/projects/:id/services/fastdlRent FastDL
Scope:
billing:spendSpends money · needs an Idempotency-KeyParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
Example request
curl -X POST "https://sourhost.net/api/v1/projects/12/services/fastdl" \
-H "Authorization: Bearer $SOURHOST_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: extend-34-2026-11" \
-d '{"planCode":"fastdl-10","name":"Карты турнира"}'Response
204 Empty response
Method errors
| 400 | idempotency_key_required | No Idempotency-Key header |
| 402 | insufficient_balance | Not enough money on the balance |
| 403 | token_spend_limit | Would exceed the token’s spending limit |
| 409 | idempotency_in_progress | A request with this key is still running |
POST
/projects/:id/services/dedicated-ipRent a dedicated IP
Scope:
billing:spendSpends money · needs an Idempotency-KeyParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
Example request
curl -X POST "https://sourhost.net/api/v1/projects/12/services/dedicated-ip" \
-H "Authorization: Bearer $SOURHOST_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: extend-34-2026-11" \
-d '{"nodeId":"de-n3","months":1}'Response
204 Empty response
Method errors
| 400 | idempotency_key_required | No Idempotency-Key header |
| 402 | insufficient_balance | Not enough money on the balance |
| 403 | token_spend_limit | Would exceed the token’s spending limit |
| 409 | idempotency_in_progress | A request with this key is still running |
DELETE
/projects/:id/services/:serviceIdDelete a service
The server and its files are deleted for good.
Scope:
servers:deleteParameters
idrequired | path · string | Project number (from GET /projects), or ticket number |
serviceIdrequired | path · string | Service number (from GET /projects/:id/services) |
Example request
curl -X DELETE "https://sourhost.net/api/v1/projects/12/services/34" \
-H "Authorization: Bearer $SOURHOST_TOKEN"Response
204 Empty response
Common errors
Any method can answer with these. More on errors
| 400 | bad_request | Invalid body or parameters |
| 401 | token_invalid | The token is wrong, revoked or expired |
| 403 | token_scope_missing | The token lacks the scope |
| 403 | token_project_forbidden | The project or service is outside the token’s limits |
| 404 | not_found | No such project, service or object |
| 429 | token_rate_limited | Too many requests, see Retry-After |
| 503 | upstream_unavailable | The panel or node didn't answer — retry later |