# Set selected repositories enabled for GitHub Actions in an organization

From **GitHub v3 REST API**.

`PUT /orgs/{org}/actions/permissions/repositories`

Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."

You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.

## Parameters

### `org`

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

## Request body

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

- Type: `object`

```json
{
  "selected_repository_ids": [
    32,
    42
  ]
}
```

```json
{"properties":{"selected_repository_ids":{"description":"List of repository IDs to enable for GitHub Actions.","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/permissions/repositories \
  --header 'content-type: application/json' \
  --data '{
  "selected_repository_ids": [
    32,
    42
  ]
}'
```
