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

From **GitHub v3 REST API**.

`PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations`

Replaces the list of organizations that have access to a self-hosted runner configured 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: true
### `application/json`

- Type: `object`

```json
{
  "selected_organization_ids": [
    32,
    91
  ]
}
```

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

## Responses

### `204`

Response

## Request examples

### cURL

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