---
title: "Set GitHub Actions permissions for a repository"
method: PUT
path: "/repos/{owner}/{repo}/actions/permissions"
tags: ["actions"]
---

# Set GitHub Actions permissions for a repository

`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.

OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

## Path parameters

- `owner` string, required
- `repo` string, required

## Request body

- object
  - `enabled` boolean, required — Whether GitHub Actions is enabled on the repository.
  - `allowed_actions` 'all' | 'local_only' | 'selected' — The permissions policy that controls the actions and reusable workflows that are allowed to run.
  - `sha_pinning_required` boolean — Whether actions must be pinned to a full-length commit SHA.

## Response `204`

Response

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
