Run in Apidog
Attach a VPC subnet to this VPS and assign a private IPv4 address. This VPS must be on the same host as the VPC. Use a subnet id from GET /vps/{id}/vpc.
Request Add parameter in header API-key
Example: API-key: ********************
or
Body Params application/json Required
Request Code Samples
curl --location 'https://mijn.host/api/v2/vps/12345/vpc/attachments' \
--header 'Accept: application/json' \
--header 'User-Agent: my-application/1.0.0' \
--header 'API-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"subnet_id": 44
}' Responses application/json
Generate Code
{
"status" : 200 ,
"status_description" : "Subnet attached." ,
"data" : {
"id" : 81 ,
"subnet_id" : 44 ,
"ip" : "10.0.1.4" ,
"subnet_name" : "lan" ,
"subnet_cidr" : "10.0.1.0/24"
}
}
Modified at 2026-09-07 15:03:25