Change VPS hostname

PUT /api/v2/vps/{id}/hostname

Change the VPS hostname.

Send exactly hostname; it must be a valid FQDN up to 253 characters, with labels using letters, numbers, and hyphens but no leading or trailing hyphen.

Reverse DNS protection details tell whether existing reverse DNS records were restored after the change.

VPS Services VM

Authentication

Required API scope: write:vm

Authenticate with an API key in the Authorization: Bearer <token> header.

Context

Path Parameters

id string required Example: vps_01hxa3b4c5d6e7f8g9h0j1k2m3

Public VPS ID. Get it from GET /api/v2/vps data[].id. Do not invent this value; use the exact ID returned by the referenced API response.

Headers

Authorization Bearer <token>
Accept application/json
Content-Type application/json

Body

required
application/json
hostname string required · Example: web-01.example.com

Responses

200 Hostname changed.
hostname string · nullable required · Example: web-01.example.com

reloadRecommended boolean required · Example: false
accountInactive boolean required · Example: false
accountStatus string · nullable required · Example: active

cacheCleared boolean required · Example: true
actions object required
actions.canChange object required
actions.canChange.allowed boolean required · Example: true
actions.canChange.reason string · nullable required · Example: null

Nullable: may be null when not applicable.

validationRules object required
validationRules.maxLengthChars integer required · Example: 253
validationRules.pattern string required · Example: ^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9...
validationRules.patternDescription string required · Example: Valid FQDN: labels 1-63 chars, alphanumeric with hyphens, no leading/trailing hyphens.
hostnameNormalized boolean required · Example: true
serviceRecordSynced boolean required · Example: true
reverseDnsProtection object | null required · Example: null
reverseDnsProtection.status string · enum required · Example: not_changed
not_changed
restored
partial_failure
reverseDnsProtection.monitoredIpCount integer required · Example: 1
reverseDnsProtection.changesDetected integer required · Example: 0
reverseDnsProtection.restoredIps array<string> required
reverseDnsProtection.failedIps array<string> required
reverseDnsProtection.detail string · nullable required · Example: null

Nullable: may be null when not applicable.

updatedAt string required · Example: 2026-04-27T12:00:00.000Z
400 Invalid request. The response body is an RFC 7807 Problem Details document.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
401 Unauthorized. Authentication is required.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
403 Forbidden. The caller lacks a required scope or does not own the resource.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
404 Not found. The resource does not exist or is not owned by the caller.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
409 The VPS is still provisioning and cannot accept hostname changes yet.

No response body

429 Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
500 Internal error. Retry later or contact support if the issue persists.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on detail.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when code is invalid_request.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
PUT https://cloud.hostup.se/api/v2/vps/{id}/hostname
For AI assistants
View as Markdown
cURL
curl -X PUT "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/hostname" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "hostname": "web-01.example.com"
  }'
Response
{
  "hostname": "web-01.example.com",
  "reloadRecommended": false,
  "accountInactive": false,
  "accountStatus": "active",
  "cacheCleared": true,
  "hostnameNormalized": true,
  "serviceRecordSynced": true,
  "reverseDnsProtection": {
    "status": "not_changed",
    "monitoredIpCount": 1,
    "changesDetected": 0,
    "restoredIps": [],
    "failedIps": [],
    "detail": null
  },
  "actions": {
    "canChange": {
      "allowed": true,
      "reason": null
    }
  },
  "validationRules": {
    "maxLengthChars": 253,
    "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$",
    "patternDescription": "Valid FQDN: labels 1-63 chars, alphanumeric with hyphens, no leading/trailing hyphens."
  },
  "updatedAt": "2026-04-27T12:00:00.000Z"
}
Request Body Change hostname
{
  "hostname": "web-01.example.com"
}