API / Method reference / Renting and renewing

Renting and renewing

The service list, renting, renewing and changing plans.

GET/projects/:id/services

A project's services

Servers, FastDL, dedicated IPs: status, address, price, next payment.

Scope: servers:read
Parameters
idrequiredpath · stringProject 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/services

Rent 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-Key
Parameters
idrequiredpath · stringProject number (from GET /projects), or ticket number
gameIdrequiredbody · stringGame from the catalog
moderequiredbody · stringtariff, slots or builder
locationId / nodeIdrequiredbody · stringLocation and node from the catalog
tariffCode / slots / cores, ramMb, ssdGbbody · string / numberThe plan for the chosen mode
monthsbody · number1, 3, 6 or 12; default: the current term
previewbody · booleantrue: 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
409node_fullNo room on the node
409ip_sold_outNo free dedicated IPs
400idempotency_key_requiredNo Idempotency-Key header
402insufficient_balanceNot enough money on the balance
403token_spend_limitWould exceed the token’s spending limit
409idempotency_in_progressA request with this key is still running
POST/projects/:id/services/:serviceId/extend

Renew a service

Scope: billing:spendSpends money · needs an Idempotency-Key
Parameters
idrequiredpath · stringProject number (from GET /projects), or ticket number
serviceIdrequiredpath · stringService number (from GET /projects/:id/services)
monthsbody · number1, 3, 6 or 12; default: the current term
previewbody · booleantrue: 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
400idempotency_key_requiredNo Idempotency-Key header
402insufficient_balanceNot enough money on the balance
403token_spend_limitWould exceed the token’s spending limit
409idempotency_in_progressA request with this key is still running
POST/projects/:id/services/extend-all

Renew all of a project's servers

Scope: billing:spendSpends money · needs an Idempotency-Key
Parameters
idrequiredpath · stringProject number (from GET /projects), or ticket number
monthsbody · number1, 3, 6 or 12; default: the current term
previewbody · booleantrue: 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
400idempotency_key_requiredNo Idempotency-Key header
402insufficient_balanceNot enough money on the balance
403token_spend_limitWould exceed the token’s spending limit
409idempotency_in_progressA request with this key is still running
GET/projects/:id/services/:serviceId/plan-options

Plan change options

Scope: servers:read
Parameters
idrequiredpath · stringProject number (from GET /projects), or ticket number
serviceIdrequiredpath · stringService 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/plan

Change 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-Key
Parameters
idrequiredpath · stringProject number (from GET /projects), or ticket number
serviceIdrequiredpath · stringService number (from GET /projects/:id/services)
moderequiredbody · stringtariff, slots or builder
tariffCode / slots / cores, ramMb, ssdGbbody · string / numberThe new plan
previewbody · booleantrue: 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
400idempotency_key_requiredNo Idempotency-Key header
402insufficient_balanceNot enough money on the balance
403token_spend_limitWould exceed the token’s spending limit
409idempotency_in_progressA request with this key is still running
POST/projects/:id/services/fastdl

Rent FastDL

Scope: billing:spendSpends money · needs an Idempotency-Key
Parameters
idrequiredpath · stringProject 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
400idempotency_key_requiredNo Idempotency-Key header
402insufficient_balanceNot enough money on the balance
403token_spend_limitWould exceed the token’s spending limit
409idempotency_in_progressA request with this key is still running
POST/projects/:id/services/dedicated-ip

Rent a dedicated IP

Scope: billing:spendSpends money · needs an Idempotency-Key
Parameters
idrequiredpath · stringProject 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
400idempotency_key_requiredNo Idempotency-Key header
402insufficient_balanceNot enough money on the balance
403token_spend_limitWould exceed the token’s spending limit
409idempotency_in_progressA request with this key is still running
DELETE/projects/:id/services/:serviceId

Delete a service

The server and its files are deleted for good.

Scope: servers:delete
Parameters
idrequiredpath · stringProject number (from GET /projects), or ticket number
serviceIdrequiredpath · stringService 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

400bad_requestInvalid body or parameters
401token_invalidThe token is wrong, revoked or expired
403token_scope_missingThe token lacks the scope
403token_project_forbiddenThe project or service is outside the token’s limits
404not_foundNo such project, service or object
429token_rate_limitedToo many requests, see Retry-After
503upstream_unavailableThe panel or node didn't answer — retry later