VPS

Terminate/cancel a service (destructive)

⚠️ Terminate/cancel one of your services. Destructive. Uses the SAME flow as the customer panel - VM destroy + IP release + refund handling.

mode=immediate destroys now (backgrounded); mode=end_of_period cancels at the end of the paid period (VM keeps running until then); mode=scheduled terminates on scheduled_date (YYYY-MM-DD). Requires confirm: true. An Idempotency-Key header is required. A service already terminated/cancelled or with a pending termination returns an error rather than acting twice.

post/v1/vps/{service_id}/terminate

Request

  • Base URL: https://developers.servera.lt
  • URL: https://developers.servera.lt/v1/vps/{service_id}/terminate
  • Auth: HTTP bearer

Path parameters

service_idinteger required

Service id of the VPS/VDS (from GET /vps) or Virtual Router (from GET /virtual-routers).

Headers

Idempotency-Keystring nullable

Request body

mode'immediate' | 'end_of_period' | 'scheduled'

immediate = destroy the VM now (backgrounded); end_of_period = cancel at the end of the paid billing period; scheduled = terminate on scheduled_date.

scheduled_datestring nullable

YYYY-MM-DD; required when mode='scheduled'.

reasonstring nullable

Optional reason, stored with the request.

refund_as_creditboolean

If a refund applies, add it to the account credit balance instead of refunding the payment gateway.

confirmboolean

Must be true - termination is irreversible.

Example request

{
  "confirm": true,
  "mode": "end_of_period"
}

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.