# Set repository access for a self-hosted runner group in an organization

From **GitHub v3 REST API**.

`PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories`

Replaces the list of repositories that have access to a self-hosted runner group configured 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
{
  "selected_repository_ids": [
    32,
    91
  ]
}
```

```json
{"properties":{"selected_repository_ids":{"description":"List of repository IDs that can access the runner group.","items":{"description":"Unique identifier of the repository.","type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}
```

## Responses

### `204`

Response

## Request examples

### cURL

```shell
curl --request PUT \
  --url {protocol}://{hostname}/api/v3/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories \
  --header 'content-type: application/json' \
  --data '{
  "selected_repository_ids": [
    32,
    91
  ]
}'
```
