> For the complete documentation index, see [llms.txt](https://docs.i3d.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.i3d.net/connectivity/dedicated-networks-api/prefixes-and-ip-addresses.md).

# Prefixes and IP addresses

Add address space to a network and read the addresses in use.

## Prefixes

A prefix is an address block inside a network. The initial prefixes are created together with the network; you add more later when a network runs out of addresses.

### Listing the prefixes of a network

[`GET /prefixes?filters[networkId][eq]={networkId}`](https://docs.i3d.net/api/api_dedicated_networks.md#prefixes)

This is the call that gives you everything you need to configure a server's network interface: the subnet (`cidr`), the gateway (`gatewayIp`), the router addresses (`routerIps`) and the VLAN (`vlanId`).

```json
{
  "items": [
    {
      "id": "01984f2e-bb02-7cc3-9d22-2f27adccf222",
      "cidr": "10.0.0.0/24",
      "family": 4,
      "state": "active",
      "fabric": "montreal-a",
      "metro": "Montreal",
      "vlanId": 3042,
      "gatewayIp": "10.0.0.1",
      "routerIps": [ "10.0.0.2", "10.0.0.3" ],
      "connectivity": { "type": "public" },
      "networkId": "01984f2e-1c3a-7d21-9d10-3542f27adccf",
      "retention": "persistent",
      "contractId": "PD-2026-000481",
      "created": "2026-07-27T09:00:00Z",
      "lastUpdated": "2026-07-27T09:02:11Z",
      "links": {
        "self": { "href": "/prefixes/01984f2e-bb02-7cc3-9d22-2f27adccf222" }
      }
    }
  ],
  "links": {
    "self": { "href": "/prefixes?filters[networkId][eq]=01984f2e-1c3a-7d21-9d10-3542f27adccf" }
  }
}
```

Other supported filters on `GET /prefixes`: `filters[family][eq]` (4 or 6), `filters[fabric][eq]`, `filters[metro][eq]` (not together with `fabric`), `filters[connectivity][eq]` (`public` or `private`), `filters[state][eq]` and `filters[cidr][contains]` (the prefixes that contain a given address or block, for example `10.0.0.5`).

While a prefix is still `provisioning`, its `cidr` is an empty string unless you stated the subnet yourself on the network create (see [Choosing the private subnet yourself](https://docs.i3d.net/connectivity/dedicated-networks-api/creating-a-network.md#choosing-the-private-subnet-yourself)); then it already shows the requested value. A private prefix has no `gatewayIp`: it carries addressing only.

### Reading a single prefix

[`GET /prefixes/{prefixId}`](https://docs.i3d.net/api/api_dedicated_networks.md#prefixes)

The single-prefix read adds three counters that the listing does not carry:

| Field       | Meaning                                                                                      |
| ----------- | -------------------------------------------------------------------------------------------- |
| `capacity`  | Usable addresses in the prefix, from its size.                                               |
| `allocated` | Addresses that exist under the prefix, including the gateway, router and reserved addresses. |
| `available` | Addresses that can still be allocated.                                                       |

### Describing a prefix (PATCH)

[`PATCH /prefixes/{prefixId}`](https://docs.i3d.net/api/api_dedicated_networks.md#prefixes)

A prefix carries two free-text fields. `description` is maintained by i3D.net and is read-only. `customerDescription` is yours: set it, change it or clear it at any time with a JSON Merge Patch body (`Content-Type: application/merge-patch+json`) carrying that single member:

* a string sets it (trimmed, 1 to 200 characters, no line breaks or other control characters);
* `null` clears it, and the field disappears from the prefix;
* an empty object `{}` changes nothing and returns the current prefix.

```json
{ "customerDescription": "edge pool, EU traffic" }
```

The response is `200` with the same representation `GET /prefixes/{prefixId}` returns, counters included, and a new `ETag`. The change is immediate: no operation to poll, nothing is configured on the network.

Any other member, including `description`, is refused with `422` naming it. A prefix that i3D.net manages for you is read-only here and answers `409` ([`E020019`](https://docs.i3d.net/api/errors/e020019.md)). A prefix with an operation still pending answers `409` ([`E020024`](https://docs.i3d.net/api/errors/e020024.md)) and the `detail` says which: while its create is still running, wait for the operation to finish and retry; while a delete is in progress there is nothing to edit, the prefix is going away; after a failed operation the prefix cannot be edited, delete it or create a new one.

### Adding a prefix to a network (PUT)

[`PUT /prefixes/{prefixId}`](https://docs.i3d.net/api/api_dedicated_networks.md#prefixes)

Requires write access (see [Prerequisites](https://docs.i3d.net/connectivity/dedicated-networks-api/getting-started.md#prerequisites)).

Generate a new UUID v7 for the prefix and name the network it belongs to. On this call you state the family and the size and i3D.net selects the subnet; an explicit `cidr` is rejected here. To choose a private subnet yourself, state it on the network create (see [Choosing the private subnet yourself](https://docs.i3d.net/connectivity/dedicated-networks-api/creating-a-network.md#choosing-the-private-subnet-yourself)).

```json
{
  "networkId": "01984f2e-1c3a-7d21-9d10-3542f27adccf",
  "family": 4,
  "size": 24,
  "contractId": "PD-2026-000481"
}
```

The response is `202 Accepted` with the prefix in state `provisioning` and a `links.operation` reference, served by `GET /prefixes/{prefixId}/operation`. Poll the prefix (`GET /prefixes/{prefixId}`) until its `state` is `active` or `failed`, exactly like a network; the operation resource carries the failure details. The same idempotency rules apply: the same UUID with the same body is a safe replay, a different body is a `409`.

The network must exist on your account and be `active`. A network i3D.net manages for you (retention `ephemeral`) does not take prefixes.

The states a prefix passes through are listed on [Network lifecycle and states](https://docs.i3d.net/connectivity/dedicated-networks-api/network-lifecycle-and-states.md#prefix-states).

### Deleting a prefix (DELETE)

[`DELETE /prefixes/{prefixId}`](https://docs.i3d.net/api/api_dedicated_networks.md#prefixes)

Requires write access (see [Prerequisites](https://docs.i3d.net/connectivity/dedicated-networks-api/getting-started.md#prerequisites)).

{% hint style="danger" %}
This operation cannot be undone. The prefix, its gateway and router addresses and its reserved addresses are removed and the routers are deconfigured.
{% endhint %}

The delete is refused with `409` while any of your IP addresses is still in use under the prefix. Decommission the servers using them first. Infrastructure addresses (gateway, router, reserved) never block a delete.

Otherwise the API answers `202 Accepted` with an operation reference. Deleting the last prefix of a network is allowed and leaves a valid, empty network. Repeating the `DELETE` is safe: it continues the teardown instead of failing. Once the teardown has completed, the prefix reads as `404`.

## IP addresses

IP addresses are **read-only** on this API. i3D.net allocates them when a server is provisioned and releases them when it is torn down. You can see the result at four places:

* [`GET /networks/{networkId}/ip-addresses`](https://docs.i3d.net/api/api_dedicated_networks.md#ip-addresses): every address under all prefixes of a network, with counters summed across the prefixes.
* [`GET /prefixes/{prefixId}/ip-addresses`](https://docs.i3d.net/api/api_dedicated_networks.md#ip-addresses): every address under one prefix, with the prefix's counters.
* [`GET /prefixes/{prefixId}/ip-addresses/{ipId}`](https://docs.i3d.net/api/api_dedicated_networks.md#ip-addresses): one address under its prefix. This is the `links.self` of every address.
* [`GET /ip-addresses/{ipId}`](https://docs.i3d.net/api/api_dedicated_networks.md#ip-addresses): one address by its UUID alone, when you do not know its prefix.

```json
{
  "items": [
    {
      "id": "01984f2e-aa01-7bb2-8c11-1f27adccf111",
      "address": "10.0.0.1",
      "family": 4,
      "prefixId": "01984f2e-bb02-7cc3-9d22-2f27adccf222",
      "role": "gateway",
      "created": "2026-07-27T09:00:00Z",
      "links": { "self": { "href": "/prefixes/01984f2e-bb02-7cc3-9d22-2f27adccf222/ip-addresses/01984f2e-aa01-7bb2-8c11-1f27adccf111" } }
    },
    {
      "id": "01984f2e-aa02-7bb2-8c11-1f27adccf112",
      "address": "10.0.0.10",
      "family": 4,
      "prefixId": "01984f2e-bb02-7cc3-9d22-2f27adccf222",
      "created": "2026-07-27T09:05:00Z",
      "links": { "self": { "href": "/prefixes/01984f2e-bb02-7cc3-9d22-2f27adccf222/ip-addresses/01984f2e-aa02-7bb2-8c11-1f27adccf112" } }
    }
  ],
  "capacity": 254,
  "allocated": 5,
  "available": 249,
  "links": { "self": { "href": "/prefixes/01984f2e-bb02-7cc3-9d22-2f27adccf222/ip-addresses" } }
}
```

Addresses that belong to the infrastructure carry a `role`: `gateway` for the prefix gateway, `router-ip` for a router address and `reserved` for an address held for future infrastructure. Addresses allocated to your servers have no `role` field. Free addresses are never listed; use the counters instead.

Follow an address's `links.self` to read it under its prefix, or call `GET /ip-addresses/{ipId}` when you only hold its UUID.

To read, list or delete a network, see [Managing networks](https://docs.i3d.net/connectivity/dedicated-networks-api/managing-networks.md). If a call fails, see [Troubleshooting](https://docs.i3d.net/connectivity/dedicated-networks-api/troubleshooting.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.i3d.net/connectivity/dedicated-networks-api/prefixes-and-ip-addresses.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
