# Update a self-hosted runner group for an enterprise

From **GitHub v3 REST API**.

`PATCH /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}`

Updates the `name` and `visibility` of a self-hosted runner group in an enterprise.

You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.

## Parameters

### `enterprise`

- Location: path
- Required: true
- Type: `string`

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

### `runner_group_id`

- Location: path
- Required: true
- Type: `integer`

Unique identifier of the self-hosted runner group.

## Request body

- Required: false
### `application/json`

- Type: `object`

```json
{
  "name": "Expensive hardware runners",
  "visibility": "selected"
}
```

```json
{"properties":{"allows_public_repositories":{"default":false,"description":"Whether the runner group can be used by `public` repositories.","type":"boolean"},"name":{"description":"Name of the runner group.","type":"string"},"visibility":{"default":"all","description":"Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected`","enum":["selected","all"],"type":"string"}},"type":"object"}
```

## Responses

### `200`

Response

### `application/json`

- Type: `object`

```json
{
  "allows_public_repositories": true,
  "default": false,
  "id": 2,
  "name": "Expensive hardware runners",
  "runners_url": "https://api.github.com/enterprises/octo-corp/actions/runner-groups/2/runners",
  "selected_organizations_url": "https://api.github.com/enterprises/octo-corp/actions/runner-groups/2/organizations",
  "visibility": "selected"
}
```

```json
{"properties":{"allows_public_repositories":{"type":"boolean"},"default":{"type":"boolean"},"id":{"type":"number"},"name":{"type":"string"},"runners_url":{"type":"string"},"selected_organizations_url":{"type":"string"},"visibility":{"type":"string"}},"required":["id","name","visibility","allows_public_repositories","default","runners_url"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request PATCH \
  --url {protocol}://{hostname}/api/v3/enterprises/{enterprise}/actions/runner-groups/{runner_group_id} \
  --header 'content-type: application/json' \
  --data '{
  "name": "Expensive hardware runners",
  "visibility": "selected"
}'
```
