# Update a self-hosted runner group for an organization

From **GitHub v3 REST API**.

`PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}`

Updates the `name` and `visibility` of a self-hosted runner group in an organization.
You must authenticate using an access token with the `admin:org` scope to use this endpoint.

## Parameters

### `org`

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

### `runner_group_id`

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

Unique identifier of the self-hosted runner group.

## Request body

- Required: true
### `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":{"description":"Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: `all`, `selected`, or `private`.","enum":["selected","all","private"],"type":"string"}},"required":["name"],"type":"object"}
```

## Responses

### `200`

Response

### `application/json`

- Type: `object`

```json
{
  "allows_public_repositories": true,
  "default": false,
  "id": 2,
  "inherited": false,
  "name": "octo-runner-group",
  "runners_url": "https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners",
  "selected_repositories_url": "https://api.github.com/orgs/octo-org/actions/runner-groups/2/repositories",
  "visibility": "selected"
}
```

```json
{"properties":{"allows_public_repositories":{"type":"boolean"},"default":{"type":"boolean"},"id":{"type":"number"},"inherited":{"type":"boolean"},"inherited_allows_public_repositories":{"type":"boolean"},"name":{"type":"string"},"runners_url":{"type":"string"},"selected_repositories_url":{"description":"Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected`","type":"string"},"visibility":{"type":"string"}},"required":["id","name","visibility","default","runners_url","inherited","allows_public_repositories"],"type":"object"}
```

## Request examples

### cURL

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