Create a network device
post
Authorizations
defguard_sessionstringRequired
Body
assigned_ipsstring[]Required
descriptionstring · nullableOptional
location_idinteger · int64Required
namestringRequired
wireguard_pubkeystringRequired
Responses
201
Network device created.
application/json
objectOptional
400
Invalid public key or IP assignment.
application/json
401
Session is missing or invalid.
application/json
403
Requires admin privileges.
application/json
500
Unable to create network device.
application/json
post/api/v1/device/network
POST /api/v1/device/network HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 180
{
"assigned_ips": [
"10.0.0.50"
],
"description": "Printer on the second floor",
"location_id": 1,
"name": "office-printer",
"wireguard_pubkey": "xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg="
}{
"config": {
"address": [
"10.0.0.15"
],
"allowed_ips": [
"10.0.0.0/24"
],
"config": "[Interface]\n...",
"dns": "10.0.0.1",
"endpoint": "vpn.example.com:50051",
"keepalive_interval": 25,
"location_mfa_mode": "disabled",
"network_id": 1,
"network_name": "office",
"posture_check_required": false,
"pubkey": "Zm9vYmFyMDEyMzQ1Njc4OWFiY2RlZmdoaWprbG1ub3A=",
"service_location_mode": "disabled"
},
"device": {
"added_by": "admin",
"added_date": "2026-08-04T10:15:00",
"assigned_ips": [
"10.0.0.15"
],
"configured": true,
"description": null,
"id": 5,
"location": {
"id": 1,
"name": "office"
},
"name": "printer",
"split_ips": [
{
"ip": "10.0.0.15",
"modifiable_part": "15",
"network_part": "10.0.0.",
"network_prefix": "/24"
}
],
"wireguard_pubkey": "5ItSw7SLkVLXPFvNxLdEQaSMOFhLxD7YsTTAlR8CbCA="
}
}Last updated
Was this helpful?