---
title: "Update repo settings"
method: PUT
path: "/api/models/{namespace}/{repo}/settings"
tags: ["models"]
---

# Update repo settings

`PUT /api/models/{namespace}/{repo}/settings`

Update the settings of a repo

## Path parameters

- `namespace` string, required
- `repo` string, required

## Request body

- object
  - `private` boolean
  - `visibility` 'private' | 'public' | 'protected' — Repository visibility. `protected` is only supported for Spaces.
  - `discussionsDisabled` boolean
  - `discussionsSorting` 'recently-created' | 'trending' | 'reactions'
  - `gated` union
    - false
    - 'auto' | 'manual'
  - `orgMembersGated` boolean — If true, members of the owning org (except admins) must also go through the gated access-request flow.
  - `gatedNotificationsEmail` string, email
  - `gatedNotificationsMode` 'bulk' | 'real-time'

## Response `200`

The updated repo settings.

- object
  - `private` boolean
  - `visibility` 'private' | 'public' | 'protected' — Repository visibility. `protected` is only supported for Spaces.
  - `discussionsDisabled` boolean
  - `discussionsSorting` 'recently-created' | 'trending' | 'reactions'
  - `gated` union
    - false
    - 'auto' | 'manual'
  - `orgMembersGated` boolean — If true, members of the owning org (except admins) must also go through the gated access-request flow.
  - `gatedNotificationsEmail` string, email
  - `gatedNotificationsMode` 'bulk' | 'real-time'

## Changes

- **2026-09-08** `bd17546f47b8` — 7 breaking, 3 info
  - removed `subschema #1, subschema #2` from the `gated` request property `anyOf` list
  - the `discussionsSorting` request property type changed from no type to `string`
  - the `gatedNotificationsMode` request property type changed from no type to `string`
  - the `visibility` request property type changed from no type to `string`
  - …6 more

[Change history](https://skmtc.dev/huggingface/apis/hub-api-endpoints/changes/api/models/:namespace/:repo/settings/put.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)
