# Set GitHub Actions permissions for a repository

From **GitHub v3 REST API**.

`PUT /repos/{owner}/{repo}/actions/permissions`

Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository.

If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions, then you cannot override them for the repository.

You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.

## Parameters

### `owner`

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

### `repo`

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

## Request body

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

- Type: `object`

```json
{
  "allowed_actions": "selected",
  "enabled": true
}
```

```json
{"properties":{"allowed_actions":{"$ref":"#/components/schemas/allowed-actions"},"enabled":{"$ref":"#/components/schemas/actions-enabled"}},"required":["enabled"],"type":"object"}
```

## Responses

### `204`

Response

## Request examples

### cURL

```shell
curl --request PUT \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/actions/permissions \
  --header 'content-type: application/json' \
  --data '{
  "allowed_actions": "selected",
  "enabled": true
}'
```
