Sample - GitHub REST API
PUT/repos/{owner}/{repo}/actions/permissions

Set GitHub Actions permissions for a repository

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

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

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 3 body fields
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
enabledbooleanrequired
Whether GitHub Actions is enabled on the repository.
allowed_actionsstringoptional
The permissions policy that controls the actions and reusable workflows that are allowed to run.
Allowed:alllocal_onlyselected
sha_pinning_requiredbooleanoptional
Whether actions must be pinned to a full-length commit SHA.

1 status code
204Response