---
title: "Update network security"
method: PATCH
path: "/api/organizations/{name}/settings/network-security"
tags: ["orgs"]
---

# Update network security

`PATCH /api/organizations/{name}/settings/network-security`

Update the network security settings for an organization.

## Path parameters

- `name` string, required

## Request body

- object
  - `enforceAuth` boolean
  - `enforceIpRestriction` boolean
  - `highRateLimits` boolean
  - `ipRanges` union[]
    - union
      - string, cidrv4
      - string, cidrv6
  - `blockedContents` object[]
    - `resource` union, required
      - 'dataset' | 'model' | 'space' | 'bucket' | 'kernel' | 'container'
      - '*'
    - `scope` string, required
  - `allowedContents` object[]
    - `resource` union, required
      - 'dataset' | 'model' | 'space' | 'bucket' | 'kernel' | 'container'
      - '*'
    - `scope` string, required
  - `keepReposMetadataVisible` boolean

## Response `200`

Updated network security settings

- object
  - `enforceAuth` boolean, required
  - `areCidrRangesApproved` boolean, required — Whether the declared ipRanges match the admin-validated CIDR ranges
  - `enforceIpRestriction` boolean, required
  - `highRateLimits` boolean, required
  - `ipRanges` string[], required
  - `blockedContents` object[], required
    - `resource` union, required
      - 'dataset' | 'model' | 'space' | 'bucket' | 'kernel' | 'container'
      - '*'
    - `scope` string, required
  - `allowedContents` object[], required
    - `resource` union, required
      - 'dataset' | 'model' | 'space' | 'bucket' | 'kernel' | 'container'
      - '*'
    - `scope` string, required
  - `keepReposMetadataVisible` boolean, required

## Changes

- **2026-09-18** `74f2b0d17636` — 2 warning, 2 info
  - added the new `container` enum value to the `allowedContents/items/resource/anyOf[subschema #1]/` response property for the response status `200`
  - added the new `container` enum value to the `blockedContents/items/resource/anyOf[subschema #1]/` response property for the response status `200`
  - added the new `container` enum value to the request property `allowedContents/items/resource/anyOf[subschema #1]/`
  - added the new `container` enum value to the request property `blockedContents/items/resource/anyOf[subschema #1]/`
- **2026-09-09** `d91f6b18c721` — 2 info
  - response property `enforceAuth` list-of-types was narrowed by removing types `string` from media type `application/json` of response `200`
  - added the required property `areCidrRangesApproved` to the response with the `200` status
- …earlier changes not shown

[Full history](https://skmtc.dev/huggingface/apis/hub-api-endpoints/changes/api/organizations/:name/settings/network-security/patch.md)

---

[API](https://skmtc.dev/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.dev/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc.dev/huggingface/apis/hub-api-endpoints/revisions/74f2b0d17636?raw)
