---
title: "[Alpha] Updates project's network restrictions by adding or removing CIDRs"
method: PATCH
path: "/v1/projects/{ref}/network-restrictions"
tags: ["Projects"]
---

# [Alpha] Updates project's network restrictions by adding or removing CIDRs

`PATCH /v1/projects/{ref}/network-restrictions`

## Path parameters

- `ref` string, required

## Request body

- NetworkRestrictionsPatchRequest
  - `add` object
    - `dbAllowedCidrs` string[]
    - `dbAllowedCidrsV6` string[]
  - `remove` object
    - `dbAllowedCidrs` string[]
    - `dbAllowedCidrsV6` string[]

## Response `200`

- NetworkRestrictionsV2Response
  - `entitlement` 'disallowed' | 'allowed', required
  - `config` object, required — At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`.
    - `dbAllowedCidrs` object[]
      - `address` string, required
      - `type` 'v4' | 'v6', required
  - `old_config` object — Populated when a new config has been received, but not registered as successfully applied to a project.
    - `dbAllowedCidrs` object[]
      - `address` string, required
      - `type` 'v4' | 'v6', required
  - `updated_at` string, date-time
  - `applied_at` string, date-time
  - `status` 'stored' | 'applied', required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden action
- `429` — Rate limit exceeded
- `500` — Failed to update project network restrictions

---

[API](https://skmtc.net/supabase/apis/management-api.md) · [All operations](https://skmtc.net/supabase/apis/management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/supabase/management-api/versions/a7cb39418064/schema)
