Sign up

Set reverse DNS

POST/api/v1/vps/{vps_uuid}/ptr

Sets the reverse DNS of the IPv4 address and of the first IPv6 address. An empty hostname goes back to the default name. Names under our own domains are not accepted.

Parameters

NameInDescription
vps_uuidpath, stringrequiredVPS id, from Create a VPS or List VPS

Request body

FieldTypeDescription
hostnamestring, optionalPTR target, e.g. mail.example.com. Empty resets to the default name.

Example request

curl -X POST "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/ptr" \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "hostname": "mail.example.com"
  }'

Answer

Status 200 with this body.

FieldTypeDescription
vps_uuidstringrequired
ptrstring, optionalReverse DNS name now
customboolean, optionalSet by you, not the default name
{
  "vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b",
  "ptr": "mail.example.com",
  "custom": true
}

Errors

StatusWhen
400Not a hostname, or a name under our domains
401No token, or a token that is not valid
422The body or a parameter is not what the operation takes

Every operation can also answer 401 without a valid token. All errors