---
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'
      - '*'
    - `scope` string, required
  - `allowedContents` object[]
    - `resource` union, required
      - 'dataset' | 'model' | 'space' | 'bucket' | 'kernel'
      - '*'
    - `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'
      - '*'
    - `scope` string, required
  - `allowedContents` object[], required
    - `resource` union, required
      - 'dataset' | 'model' | 'space' | 'bucket' | 'kernel'
      - '*'
    - `scope` string, required
  - `keepReposMetadataVisible` boolean, required

## Changes

- **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
- **2026-09-08** `bd17546f47b8` — 3 breaking, 1 warning, 6 info
  - removed `subschema #1, subschema #2` from the `allowedContents/items/resource` request property `anyOf` list
  - removed `subschema #1, subschema #2` from the `blockedContents/items/resource` request property `anyOf` list
  - the `enforceAuth/anyOf[subschema #2]/` response's property type changed from no type to `string` for status `200`
  - changed the pattern of the request property `ipRanges/items/anyOf[subschema #2]/` from `^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$` to `^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$`
  - …6 more
- …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/805b42ee6d4c?raw)
