# Update organization settings


[API catalog](/reference/api/) · [Docker Hub overview](/reference/api/hub/latest/) · [Product manual](https://docs.docker.com/docker-hub/) · [OpenAPI specification](/reference/api/hub/latest.yaml)

API version: 2-beta



`PUT /v2/orgs/{name}/settings`

Updates an organization's settings. Some settings are only used when the organization is on a business subscription.

***Only users with administrative privileges for the organization (owner role) can modify these settings.***

The following settings are only used on a business subscription:
- `restricted_images`


## Connection and access

[API connection and authentication guidance](/reference/api/hub/latest/#authentication)


Server: `https://hub.docker.com`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
[
  {
    "bearerAuth": []
  }
]
```
## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request PUT \
  --header "Authorization: Bearer ${TOKEN}" \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "restricted_images": {
    "allow_official_images": true,
    "allow_verified_publishers": true,
    "enabled": true
  }
}' \
  'https://hub.docker.com/v2/orgs/<NAME>/settings'
```

## Parameters

### name

Location: path. Required: yes.

Name of the organization.

```json
{
  "description": "Name of the organization.",
  "in": "path",
  "name": "name",
  "pointer": "/paths/~1v2~1orgs~1{name}~1settings/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Request  application/json




Schema:

```json
{
  "examples": [
    {
      "restricted_images": {
        "allow_official_images": true,
        "allow_verified_publishers": true,
        "enabled": true
      }
    }
  ],
  "properties": {
    "restricted_images": {
      "allOf": [
        {
          "$ref": "#/components/schemas/restricted_images"
        },
        {
          "required": [
            "enabled",
            "allow_official_images",
            "allow_verified_publishers"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "restricted_images"
  ]
}
```




Schema example:
```json
{
  "restricted_images": {
    "allow_official_images": true,
    "allow_verified_publishers": true,
    "enabled": true
  }
}
```


### Response 200 application/json

OK


Schema:

```json
{
  "$ref": "#/components/schemas/orgSettings"
}
```




Schema example:
```json
{
  "restricted_images": {
    "allow_official_images": true,
    "allow_verified_publishers": true,
    "enabled": true
  }
}
```


### Response 401 application/json

Unauthorized


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "unauthorized"
}
```


### Response 403 application/json

Forbidden


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "permission denied"
}
```


### Response 404 application/json

Not Found


Schema:

```json
{
  "$ref": "#/components/schemas/error"
}
```




error:
```json
{
  "errinfo": null,
  "message": "not found"
}
```


## Complete operation contract

```json
{
  "description": "Updates an organization's settings. Some settings are only used when the organization is on a business subscription.\n\n***Only users with administrative privileges for the organization (owner role) can modify these settings.***\n\nThe following settings are only used on a business subscription:\n- `restricted_images`\n",
  "operationId": "putV2OrgsByNameSettings",
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "examples": [
            {
              "restricted_images": {
                "allow_official_images": true,
                "allow_verified_publishers": true,
                "enabled": true
              }
            }
          ],
          "properties": {
            "restricted_images": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/restricted_images"
                },
                {
                  "required": [
                    "enabled",
                    "allow_official_images",
                    "allow_verified_publishers"
                  ],
                  "type": "object"
                }
              ]
            }
          },
          "required": [
            "restricted_images"
          ]
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/orgSettings"
          }
        }
      },
      "description": "OK"
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "summary": "Update organization settings",
  "tags": [
    "org-settings"
  ]
}
```

## Referenced schemas

- `#/components/responses/Forbidden`

- `#/components/responses/NotFound`

- `#/components/responses/Unauthorized`

- [#/components/schemas/orgSettings](/reference/api/hub/latest/schemas/orgSettings/)

- [#/components/schemas/restricted_images](/reference/api/hub/latest/schemas/restricted_images/)




