Skip to main content

Add selected repository to an organization secret

Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/[email protected]/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.

PUT/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
org string
required
secret_name string
required

secret_name parameter

repository_id integer
required

Responses

No Content when repository was added to the selected list

Conflict when visibility type is not set to selected