---
title: "Update a subnet"
method: PATCH
path: "/{org_slug}/subnets/{id}"
tags: ["IPAM"]
---

# Update a subnet

`PATCH /{org_slug}/subnets/{id}`

## Request

- Base URL: `https://api.obelinf.com`
- URL: `https://api.obelinf.com/{org_slug}/subnets/{id}`
- Auth: HTTP bearer

Update a subnet

## Path parameters

- `org_slug` string, required
- `id` string, required

## Request body

- object
  - `cidr` string
  - `description` string, nullable
  - `gateway` string, nullable
  - `name` string
  - `site_id` string, nullable
  - `vlan_id` string, nullable
  - `vrf_id` string, nullable

## Response `200`

Subnet updated

- object
  - `subnet` object, required
    - `cidr` string, required
    - `id` string, required
    - `name` string, required
    - `description` string, nullable
    - `gateway` string, nullable
    - `site_id` string, nullable
    - `vlan_id` string, nullable
    - `vrf_id` string, nullable
  - `tags` object[], required
    - `id` string, required
    - `tag_id` string, required
    - `tag_name` string, required
    - `tag_color` string, nullable

## Other responses

- `400`: Validation error
- `404`: Not found

---

[API](https://skmtc.dev/obelinf/apis/obelinf-api.md) · [All operations](https://skmtc.dev/obelinf/apis/obelinf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/obelinf/apis/obelinf-api/revisions/463fcf791828?raw)
