Sample - GitHub REST API
PUT/orgs/{org}/settings/immutable-releases

Set immutable releases settings for an organization

Sets the immutable releases policy for repositories in an organization.

OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

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

1 parameter · 2 body fields
orgstringrequired
The organization name. The name is not case sensitive.
enforced_repositoriesstringrequired
The policy that controls how immutable releases are enforced in the organization.
Allowed:allnoneselected
selected_repository_idsarray<integer>optional
An array of repository ids for which immutable releases enforcement should be applied. You can only provide a list of repository ids when the `enforced_repositories` is set to `selected`. You can add and remove individual repositories using the [Enable a selected repository for immutable releases in an organization](https://docs.github.com/rest/orgs/orgs#enable-a-selected-repository-for-immutable-releases-in-an-organization) and [Disable a selected repository for immutable releases in an organization](https://docs.github.com/rest/orgs/orgs#disable-a-selected-repository-for-immutable-releases-in-an-organization) endpoints.

1 status code
204Response