## GET /api/v2/routed-ipv6

**List account routed IPv6**

Returns the account-level routed IPv6 state: allocated /48 pools, active routed subnets, eligible VPS destinations, allowed route prefix lengths, and action gates. Self-service allocation is available only when the account has no routed /48 yet; migrated accounts may still show more than one pool. Consumers should use `actions` and destination `actions.canReceiveRoute` instead of inferring readiness from VPS fields.

### Related Endpoints

- `POST /api/v2/routed-ipv6`: Allocate a routed IPv6 pool or route a subnet
- `DELETE /api/v2/routed-ipv6/{id}`: Release an empty routed IPv6 pool
- `DELETE /api/v2/routed-ipv6/routes/{id}`: Delete a routed IPv6 route

### Headers

- `Accept`: application/json
- `Authorization`: Bearer YOUR_API_KEY
- Required API scopes: `read:network`, `read:vm`

### Request Example

```bash
curl -X GET "https://cloud.hostup.se/api/v2/routed-ipv6" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
```

### Response Schema

- `available` (boolean, optional) Example: `true`
- `reason` (string,null, optional) Example: `null`
- `allowedPrefixLengths` (array<integer>, optional) Example: `[48,56,64]`
- `pools` (array<object>, optional)
- `pools[].id` (string, required) Example: `ripv6_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `pools[].parentCidr` (string, required) Example: `2001:db8:1000::/48`
- `pools[].prefixLength` (integer, required) Example: `48`
  Allowed values: 48
- `pools[].status` (string, required) Example: `active`
  Allowed values: active
- `pools[].allocatedAt` (string,null, required) Example: `2026-06-15T12:00:00.000Z`
- `pools[].updatedAt` (string,null, required) Example: `2026-06-15T12:00:00.000Z`
- `pools[].routes` (array<object>, required)
- `pools[].routes[].id` (string, required) Example: `ripv6rt_01hxa3b4c5d6e7f8g9h0j1k2m4`
- `pools[].routes[].prefix` (string, required) Example: `2001:db8:1000:10::/64`
- `pools[].routes[].prefixLength` (integer, required) Example: `64`
  Allowed values: 48, 56, 64
- `pools[].routes[].nextHop` (string, required) Example: `2001:db8::10`
- `pools[].routes[].label` (string,null, required) Example: `web subnet`
- `pools[].routes[].vpsId` (string, required) Example: `vps_01hxa3b4c5d6e7f8g9h0j1k2m5`
- `pools[].routes[].vpsName` (string, required) Example: `web-01`
- `pools[].routes[].status` (string, required) Example: `active`
  Allowed values: active
- `pools[].routes[].allocatedAt` (string,null, required) Example: `2026-06-15T12:01:00.000Z`
- `pools[].routes[].updatedAt` (string,null, required) Example: `2026-06-15T12:01:00.000Z`
- `pools[].routes[].actions` (object, required)
- `pools[].routes[].actions.canDelete` (object, required): Whether one routed IPv6 action is currently available.
- `pools[].routes[].actions.canDelete.allowed` (boolean, required) Example: `true`
- `pools[].routes[].actions.canDelete.reason` (string,null, required) Example: `null`
- `pools[].actions` (object, required)
- `pools[].actions.canCreateRoute` (object, required): Whether one routed IPv6 action is currently available.
- `pools[].actions.canCreateRoute.allowed` (boolean, required) Example: `true`
- `pools[].actions.canCreateRoute.reason` (string,null, required) Example: `null`
- `pools[].actions.canRelease` (object, required): Whether one routed IPv6 action is currently available.
- `pools[].actions.canRelease.allowed` (boolean, required) Example: `true`
- `pools[].actions.canRelease.reason` (string,null, required) Example: `null`
- `destinations` (array<object>, optional)
- `destinations[].vpsId` (string, required) Example: `vps_01hxa3b4c5d6e7f8g9h0j1k2m5`
- `destinations[].name` (string, required) Example: `web-01`
- `destinations[].primaryIp` (string,null, required) Example: `192.0.2.10`
- `destinations[].nextHop` (string,null, required) Example: `2001:db8::10`
- `destinations[].serviceStatus` (string, required) Example: `active`
- `destinations[].actions` (object, required)
- `destinations[].actions.canReceiveRoute` (object, required): Whether one routed IPv6 action is currently available.
- `destinations[].actions.canReceiveRoute.allowed` (boolean, required) Example: `true`
- `destinations[].actions.canReceiveRoute.reason` (string,null, required) Example: `null`
- `actions` (object, optional)
- `actions.canAllocatePool` (object, required): Whether one routed IPv6 action is currently available.
- `actions.canAllocatePool.allowed` (boolean, required) Example: `true`
- `actions.canAllocatePool.reason` (string,null, required) Example: `null`
- `actions.canCreateRoute` (object, required): Whether one routed IPv6 action is currently available.
- `actions.canCreateRoute.allowed` (boolean, required) Example: `true`
- `actions.canCreateRoute.reason` (string,null, required) Example: `null`

### Responses

#### 200 - Account routed IPv6 state.
```json
{
  "available": true,
  "reason": null,
  "allowedPrefixLengths": [
    48,
    56,
    64
  ],
  "pools": [
    {
      "id": "ripv6_01hxa3b4c5d6e7f8g9h0j1k2m3",
      "parentCidr": "2001:db8:1000::/48",
      "prefixLength": 48,
      "status": "active",
      "allocatedAt": "2026-06-15T12:00:00.000Z",
      "updatedAt": "2026-06-15T12:00:00.000Z",
      "routes": [
        {
          "id": "ripv6rt_01hxa3b4c5d6e7f8g9h0j1k2m4",
          "prefix": "2001:db8:1000:10::/64",
          "prefixLength": 64,
          "nextHop": "2001:db8::10",
          "label": "web subnet",
          "vpsId": "vps_01hxa3b4c5d6e7f8g9h0j1k2m5",
          "vpsName": "web-01",
          "status": "active",
          "allocatedAt": "2026-06-15T12:01:00.000Z",
          "updatedAt": "2026-06-15T12:01:00.000Z",
          "actions": {
            "canDelete": {
              "allowed": true,
              "reason": null
            }
          }
        }
      ],
      "actions": {
        "canCreateRoute": {
          "allowed": true,
          "reason": null
        },
        "canRelease": {
          "allowed": false,
          "reason": "Remove routed subnets before releasing this /48."
        }
      }
    }
  ],
  "destinations": [
    {
      "vpsId": "vps_01hxa3b4c5d6e7f8g9h0j1k2m5",
      "name": "web-01",
      "primaryIp": "192.0.2.10",
      "nextHop": "2001:db8::10",
      "serviceStatus": "active",
      "actions": {
        "canReceiveRoute": {
          "allowed": true,
          "reason": null
        }
      }
    }
  ],
  "actions": {
    "canAllocatePool": {
      "allowed": false,
      "reason": "This account already has a routed /48."
    },
    "canCreateRoute": {
      "allowed": true,
      "reason": null
    }
  }
}
```

#### 400 - Invalid request. The response body is an RFC 7807 Problem Details document.
```json
{
  "type": "https://developer.hostup.se/errors/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "detail": "The request body failed validation.",
  "code": "invalid_request",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z",
  "errors": [
    {
      "pointer": "/items/0/domainName",
      "detail": "`domainName` is required.",
      "code": "invalid_request"
    }
  ]
}
```

#### 401 - Unauthorized. Authentication is required.
```json
{
  "type": "https://developer.hostup.se/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Authentication is required.",
  "code": "unauthorized",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 403 - Forbidden. The caller lacks a required scope or does not own the resource.
```json
{
  "type": "https://developer.hostup.se/errors/forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "The caller lacks a required scope or does not own the resource.",
  "code": "forbidden",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 404 - Not found. The resource does not exist or is not owned by the caller.
```json
{
  "type": "https://developer.hostup.se/errors/not_found",
  "title": "Not found",
  "status": 404,
  "detail": "The requested resource could not be found.",
  "code": "not_found",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 429 - Rate limited. Retry after the limit resets. 429 responses include `Retry-After` seconds plus `X-RateLimit-*` headers.
```json
{
  "type": "https://developer.hostup.se/errors/rate_limit_exceeded",
  "title": "Too many requests",
  "status": 429,
  "detail": "Too many requests. Retry after the limit resets.",
  "code": "rate_limit_exceeded",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 500 - Internal error. Retry later or contact support if the issue persists.
```json
{
  "type": "https://developer.hostup.se/errors/internal_error",
  "title": "Internal server error",
  "status": 500,
  "detail": "An unexpected error occurred. Retry later or contact support if the issue persists.",
  "code": "internal_error",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```
