Run in Apidog
Add a private subnet to the account VPC. This VPS must be on the same host as the VPC. Omitted gateway, dhcp_start and dhcp_end are filled from the CIDR when possible.
Request Add parameter in header API-key
Example: API-key: ********************
or
Body Params application/json Required
{
"name" : "lan" ,
"cidr" : "10.0.1.0/24" ,
"gateway" : "10.0.1.1" ,
"dhcp_start" : "10.0.1.2" ,
"dhcp_end" : "10.0.1.254"
} Request Code Samples
curl --location 'https://mijn.host/api/v2/vps/12345/vpc/subnets' \
--header 'Accept: application/json' \
--header 'User-Agent: my-application/1.0.0' \
--header 'API-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "lan",
"cidr": "10.0.1.0/24",
"gateway": "10.0.1.1",
"dhcp_start": "10.0.1.2",
"dhcp_end": "10.0.1.254"
}' Responses application/json
Generate Code
{
"status" : 200 ,
"status_description" : "Subnet created." ,
"data" : {
"id" : 44 ,
"name" : "lan" ,
"cidr" : "10.0.1.0/24" ,
"gateway" : "10.0.1.1" ,
"dhcp_start" : "10.0.1.2" ,
"dhcp_end" : "10.0.1.254" ,
"created" : "06-09-2026 09:16"
}
}
Modified at 2026-09-07 15:03:25