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

# Set default workflow permissions for a repository

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

Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions
can submit approving pull request reviews.
For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-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

- ActionsSetDefaultWorkflowPermissions
  - `default_workflow_permissions` 'read' | 'write' — The default workflow permissions granted to the GITHUB_TOKEN when running workflows.
  - `can_approve_pull_request_reviews` boolean — Whether GitHub Actions can approve pull requests. Enabling this can be a security risk.

## Response `204`

Success response

## Other responses

- `409` — Conflict response when changing a setting is prevented by the owning organization

---

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