POST/api/networks

Create a network

Creates a network. Supply name to identify the network, and optionally include description to describe it. The response contains the created network object and its identifier.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 body fields

Network details for the network to create.

descriptionstringoptional
Network description
namestringrequired
Network name

5 status codes
200Returns the created network object, including its identifier, name, and available network details.
idstringrequired
Network ID
policiesarray<string>required
List of policy IDs associated with the network
resourcesarray<string>required
List of network resource IDs associated with the network
routersarray<string>required
List of router IDs associated with the network
routing_peers_countintegerrequired
Count of routing peers associated with the network
descriptionstringoptional
Network description
namestringrequired
Network name
400Returned when the request is malformed or the required `name` field is missing.
401Returned when authentication is required but missing or invalid.
403Returned when the operation is forbidden.
500Returned when an internal server error occurs.

Error handling

A 400 is returned for a malformed request, a 401 when authentication is required but missing or invalid, a 403 when the operation is forbidden, and a 500 for an internal server error. The name field is required in the request body.