Layerbeat

Renew a server subscription

POST
/v1/vms/{id}/renew

Renews a VPS for 1, 3 or 12 months using your personal credit. Keep the same Idempotency-Key when retrying.

Access: API key: vm:write · Session: developer, admin or owner.

Authorization

headerAuthorizationBearer <token>

Send Authorization: Bearer <token>. A token is an API key (lb_live_…, scoped, for programs) or a session (lb_sess_…, from signup or login, for people). See Authentication above.

Path Parameters

id*string

The resource id.

Header Parameters

X-Org-ID?string

Sessions only: act on this organization (you must be a member). Default: your first organization.

Idempotency-Key?string

A unique string (for example a UUID). Repeating the same request with the same key returns the original result instead of buying again.

Request Body

application/json
  1. body
currency?string

Selected personal credit balance. Never converts or combines balances.

Value in"USD""IDR"
term_months*integer
Value in1312
maximum_amount*string

Maximum personal credit to reserve for this renewal in USD

Match^[0-9]+([.][0-9]{1,2})?$

Response Body

Personal credit reserved; poll the operation

application/json
  1. response

The purchased VM and its asynchronous operation. Creation always spends available credit.

vm*
operation*
curl -X POST 'https://layerbeat.com/v1/vms/string/renew' \  -H 'Idempotency-Key: 7c1f1b0e-6f0c-4a5e-9c33-2d0c0f1c9a11' \  -H 'Content-Type: application/json' \  -d '{  "term_months": 1,  "maximum_amount": "12.00"}'
{  "vm": {    "id": "vm_gnkrp6zuxvsqki7sqxeluvsw2y",    "name": "web-1",    "status": "running",    "region": "sgp",    "plan": "small",    "image": "ubuntu-24-04",    "ipv4": "203.0.113.10",    "ipv6": null,    "vcpu": 2,    "memory_mb": 2048,    "disk_gb": 60,    "created_at": "2026-10-01T10:00:00Z",    "expires_at": "2026-11-01T10:00:00Z",    "auto_renew": false,    "ssh_key_ids": [      "key_m2q8vx4zt7kd5wn3bj6hf9cpra"    ],    "tags": {}  },  "operation": {    "id": "op_4yw4xmradad4bstgr4d5qtreb4",    "type": "vm.renew",    "status": "pending",    "vm_id": "vm_gnkrp6zuxvsqki7sqxeluvsw2y",    "steps": [      {        "name": "payment_reserved",        "status": "succeeded"      },      {        "name": "renewing_subscription",        "status": "running"      }    ],    "result": null,    "error": null,    "created_at": "2026-10-01T10:00:00Z",    "finished_at": null  }}