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

# Update repo settings

`PUT /api/spaces/{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
    - unknown
    - '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
    - unknown
    - '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'

---

[API](https://skmtc.net/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.net/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/hub-api-endpoints/versions/8443210055e0/schema)
